Skip to content

Commit

Permalink
feat(TextInput): add autocomplete props to textinput
Browse files Browse the repository at this point in the history
  • Loading branch information
hdeschenes-equisoft committed May 19, 2021
1 parent 12dd133 commit fdafb51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/components/card/card.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react/src/components/card/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Card = styled.div`
background: ${(props) => props.theme.greys.white};
border: 1px solid ${(props) => props.theme.greys['light-grey']};
border-radius: var(--border-radius);
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2);
box-sizing: border-box;
margin-bottom: var(--spacing-3x);
padding: var(--spacing-4x);
Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/components/text-input/text-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Input = styled.input`
`;

type PartialInputProps = Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,
'inputMode' | 'name' | 'value'>;
'inputMode' | 'name' | 'value' | 'autoComplete'>;

interface TextInputProps extends PartialInputProps {
className?: string;
Expand Down Expand Up @@ -61,6 +61,7 @@ export const TextInput = forwardRef(({
type,
validationErrorMessage,
value,
autoComplete,
onBlur,
onChange,
onFocus,
Expand Down Expand Up @@ -100,6 +101,7 @@ export const TextInput = forwardRef(({
hint={hint}
>
<Input
autoComplete={autoComplete}
defaultValue={defaultValue}
disabled={disabled}
id={id}
Expand Down

0 comments on commit fdafb51

Please sign in to comment.