feat: add placeholder prop to TextField component

This commit is contained in:
Hossein Mehrabi 2023-02-23 15:21:27 +03:30
parent 74a54a6575
commit a1598dfd1a
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,7 @@ export type TextFieldProps = Omit<
supportingText?: string
value?: string
defaultValue?: string
placeholder?: string
inputProps?: React.InputHTMLAttributes<HTMLInputElement>
}
@ -29,6 +30,7 @@ export const TextField: React.FC<TextFieldProps> & {
error = false,
children,
value,
placeholder,
defaultValue,
onChange,
inputProps = {},
@ -52,6 +54,7 @@ export const TextField: React.FC<TextFieldProps> & {
>
<div>
<input
placeholder={placeholder}
{...inputProps}
ref={ref}
value={input.value}