Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Jun 19, 2024
1 parent 35fe6ef commit acc1043
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fabric/src/components/TextInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ export function TextAreaInput({
}

export type AddressInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value'> &
Omit<InputUnitProps, 'inputElement'>
Omit<InputUnitProps, 'inputElement'> & {
value?: string
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void
}

export function AddressInput({
id,
Expand All @@ -262,6 +266,7 @@ export function AddressInput({
errorMessage,
onBlur,
onChange,
value,
...inputProps
}: AddressInputProps) {
const defaultId = React.useId()
Expand Down Expand Up @@ -296,6 +301,7 @@ export function AddressInput({
onBlur(e)
}
}

return (
<InputUnit
label={label}
Expand All @@ -308,6 +314,7 @@ export function AddressInput({
type="text"
onChange={handleChange}
onBlur={handleBlur}
value={value}
action={
network && (
<Shelf
Expand Down

0 comments on commit acc1043

Please sign in to comment.