Skip to content

Commit fb89843

Browse files
committed
pass down class props to inner input and label
1 parent 0f07ead commit fb89843

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/TextField.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function TextField({ id = '', className = '', inputClassName = ''
1616
(
1717
<textarea
1818
id="current-id"
19-
className={`text-field__input text-field__input--as-textarea ${hasPlaceholder() ? 'text-field__input--has-placeholder' : 'text-field__input--has-no-placeholder'}`}
19+
className={`text-field__input text-field__input--as-textarea ${hasPlaceholder() ? 'text-field__input--has-placeholder' : 'text-field__input--has-no-placeholder'} ${inputClassName}`}
2020
value={value}
2121
onChange={onChange}
2222
disabled={disabled}
@@ -28,7 +28,7 @@ export default function TextField({ id = '', className = '', inputClassName = ''
2828
(
2929
<input
3030
id=""
31-
className={`text-field__input ${hasPlaceholder() ? 'text-field__input--has-placeholder' : 'text-field__input--has-no-placeholder'}`}
31+
className={`text-field__input ${hasPlaceholder() ? 'text-field__input--has-placeholder' : 'text-field__input--has-no-placeholder'} ${inputClassName}`}
3232
type={type}
3333
value={value}
3434
onChange={onChange}
@@ -39,7 +39,7 @@ export default function TextField({ id = '', className = '', inputClassName = ''
3939
)
4040
}
4141
<label
42-
className={`text-field__label`}
42+
className={`text-field__label ${labelClassName}`}
4343
htmlFor=""
4444
>
4545
{ label }

0 commit comments

Comments
 (0)