Skip to content

Commit

Permalink
Merge pull request #1156 from primer/as-prop
Browse files Browse the repository at this point in the history
Fix `as` prop definition in TextInput
  • Loading branch information
colebemis authored Apr 8, 2021
2 parents 4a5f45a + fbe0e25 commit 7613c2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ const Wrapper = styled.span<StyledWrapperProps>`
${sx};
`

type TextInputInternalProps = {icon?: React.ComponentType<{className?: string}>} & ComponentProps<typeof Wrapper> &
type TextInputInternalProps = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
as?: any // This is a band-aid fix until we have better type support for the `as` prop
icon?: React.ComponentType<{className?: string}>
} & ComponentProps<typeof Wrapper> &
ComponentProps<typeof Input>

// using forwardRef is important so that other components (ex. SelectMenu) can autofocus the input
Expand Down

1 comment on commit 7613c2f

@vercel
Copy link

@vercel vercel bot commented on 7613c2f Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.