Skip to content

Commit

Permalink
feat(component): default to type="text" on <TextInput> (themesber…
Browse files Browse the repository at this point in the history
…g#1206)

All of the other form components provide an implicit `type=".."` field so this one should, too. It
is implied by the name that this will be an `<input type="text">` by default, and you have the
*option* to provide a specific other `type`.
  • Loading branch information
tulup-conner authored and ddiasfront committed Jan 1, 2024
1 parent cbb1a82 commit b492ceb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
shadow,
sizing = 'md',
theme: customTheme = {},
type = 'text',
...props
},
ref,
Expand Down Expand Up @@ -95,6 +96,7 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
theme.field.input.withAddon[addon ? 'on' : 'off'],
theme.field.input.withShadow[shadow ? 'on' : 'off'],
)}
type={type}
{...props}
ref={ref}
/>
Expand Down

0 comments on commit b492ceb

Please sign in to comment.