({
className,
label,
id,
type,
placeholder,
value,
defaultValue,
required,
disabled = false,
readOnly = false,
onChange,
onBlur,
onKeyDown,
autoFocus,
...rest
}: Props)
| 21 | } |
| 22 | |
| 23 | export default function TextField({ |
| 24 | className, |
| 25 | label, |
| 26 | id, |
| 27 | type, |
| 28 | placeholder, |
| 29 | value, |
| 30 | defaultValue, |
| 31 | required, |
| 32 | disabled = false, |
| 33 | readOnly = false, |
| 34 | onChange, |
| 35 | onBlur, |
| 36 | onKeyDown, |
| 37 | autoFocus, |
| 38 | ...rest |
| 39 | }: Props) { |
| 40 | return ( |
| 41 | <Field> |
| 42 | {label && <Label htmlFor={id}>{label}</Label>} |
| 43 | <TextInput |
| 44 | className={className} |
| 45 | id={id} |
| 46 | type={type} |
| 47 | placeholder={placeholder} |
| 48 | value={value} |
| 49 | defaultValue={defaultValue} |
| 50 | required={required} |
| 51 | disabled={disabled} |
| 52 | readOnly={readOnly} |
| 53 | onChange={onChange} |
| 54 | onBlur={onBlur} |
| 55 | onKeyDown={onKeyDown} |
| 56 | autoFocus={autoFocus} |
| 57 | {...rest} |
| 58 | /> |
| 59 | </Field> |
| 60 | ); |
| 61 | } |
nothing calls this directly
no outgoing calls
no test coverage detected