Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Make Search component more extendable #2209

Closed
gidjin opened this issue Oct 26, 2022 · 0 comments · Fixed by #2230
Closed

[feat] Make Search component more extendable #2209

gidjin opened this issue Oct 26, 2022 · 0 comments · Fixed by #2230
Assignees
Labels
type: feature New feature or request

Comments

@gidjin
Copy link
Contributor

gidjin commented Oct 26, 2022

Does your feature request relate to a specific USWDS component?
Yes Search

What USWDS Version is this feature present in?
Current

Is your feature request related to a problem? Please describe.
Many of our props take inputProps to pass down to the underlying <TextInput> or <input> tag. Search should also allow for that, as well as other possible unforseen customization.

Describe the solution you'd like
Make it easier to extend or customize the Search/ search related components.

Describe alternatives you've considered

  • Option one, add inputProps to Search and pass it down to TextInput.
  • Option two, make Search more composable in general
    • create a SearchForm component that encapsulates the search form specific props and use it in the Search component
    • create a SearchButton component that encapsulates the custom button
    • use these in Search and storybook examples
    • We should consider if adding inputProps makes sense here or if just an example of building it out separately is enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants