|
|
|
@ -34,6 +34,7 @@ type Props = Readonly<{
|
|
|
|
|
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
|
|
|
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
|
|
|
startIcon?: React.ComponentType<React.ComponentProps<'svg'>>;
|
|
|
|
|
value?: string;
|
|
|
|
|
}> &
|
|
|
|
|
Readonly<Attributes>;
|
|
|
|
|
|
|
|
|
@ -57,6 +58,7 @@ function TextInput(
|
|
|
|
|
label,
|
|
|
|
|
startIcon: StartIcon,
|
|
|
|
|
type = 'text',
|
|
|
|
|
value,
|
|
|
|
|
onChange,
|
|
|
|
|
...props
|
|
|
|
|
}: Props,
|
|
|
|
@ -100,6 +102,7 @@ function TextInput(
|
|
|
|
|
disabled={disabled}
|
|
|
|
|
id={id}
|
|
|
|
|
type={type}
|
|
|
|
|
value={value != null ? value : undefined}
|
|
|
|
|
onChange={(event) => {
|
|
|
|
|
if (!onChange) {
|
|
|
|
|
return;
|
|
|
|
|