You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: We union our props with IntrinsicElements[THE_ROOT_ELEMENT] pretty often, inline in the component args. We would want those exported with the type, so it might require small refactors to perform the union when declaring the type instead.
Describe alternatives you've considered
The workaround today is for consumers to use ComponentProps, e.g.
Does your feature request relate to a specific USWDS component?
All components, we should make it a convention going forward to export their props
Is your feature request related to a problem? Please describe.
Sometimes consumers want to get TS access to the props our components accept. It's not always easy/intuitive to do so.
Describe the solution you'd like
export all our component prop type definitions, similar to https://github.com/react-bootstrap/react-bootstrap/blob/master/src/index.tsx.
Note: We union our props with
IntrinsicElements[THE_ROOT_ELEMENT]
pretty often, inline in the component args. We would want those exported with the type, so it might require small refactors to perform the union when declaring the type instead.Describe alternatives you've considered
The workaround today is for consumers to use ComponentProps, e.g.
The text was updated successfully, but these errors were encountered: