Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 1870613

Browse files
authored
Merge pull request #172 from utkarsha-deriv/utkarsha/placeholder-fix
2 parents 65c4538 + 610fe61 commit 1870613

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/features/dashboard/components/ApiTokenForm/api-token.form.module.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ form {
2828
}
2929
&.first_step {
3030
margin-bottom: rem(2.4);
31-
&::before {
31+
&::before {
3232
content: '1';
3333
}
3434
}
@@ -99,14 +99,17 @@ form {
9999
&:focus {
100100
outline-color: unset;
101101
outline: 1px solid var(--colors-blue500);
102-
border-radius: 3px;
102+
border-radius: rem(0.3);
103103
& ~ label {
104104
color: var(--colors-blue400);
105105
background-color: var(--ifm-color-emphasis-0);
106106
padding: 0 rem(0.4);
107107
transform: translateY(rem(-2)) scale(0.75);
108108
}
109109
}
110+
&::placeholder {
111+
color: var(--colors-greyLight600);
112+
}
110113
}
111114
}
112115

@@ -119,3 +122,9 @@ form {
119122
grid-template-columns: 1fr;
120123
}
121124
}
125+
126+
.helperText {
127+
font-size: rem(1.4);
128+
padding-left: rem(1);
129+
color: var(--colors-greyLight600);
130+
}

src/features/dashboard/components/ApiTokenForm/api-token.form.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,12 @@ const ApiTokenForm = (props: HTMLAttributes<HTMLFormElement>) => {
134134
</div>
135135
</div>
136136
<div className={styles.customTextInput}>
137-
<input type='text' name='name' {...register('name')} />
137+
<input type='text' name='name' {...register('name')} placeholder='Token name' />
138138
<Button type='submit'>Create</Button>
139139
</div>
140+
<div className={styles.helperText}>
141+
<p>Length of token name must be between 2 and 32 characters.</p>
142+
</div>
140143
<div className={styles.step_title}>
141144
<div className={`${styles.third_step} ${styles.step}`}>
142145
<Text as={'p'} type={'paragraph-1'} data-testid={'third-step-title'}>

0 commit comments

Comments
 (0)