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: Add all component prop type definitons as exports #2666

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RobKohr
Copy link

@RobKohr RobKohr commented Nov 20, 2023

When creating a wrapper that extends a uswds component, it is useful to import in the Props that the wrapped component has so that the wrapped component’s prop types can be extended rather than having to copy and paste them.

To allow this, I am adding exports for all Props type definitions.

This shouldn’t have any impact on any projects that use react-uswds.

Summary

Related Issues or PRs

#2667
#2728

How To Test

Nothing should change for the use of the package, but anything importing the package should also be able to import the Props type definition for any component.

When creating a wrapper that extends a uswds component, it is useful to import in the Props that the wrapped component has so that the wrapped component’s prop types can be extended rather than having to copy and paste them.

To allow this, I am adding exports for all Props type definitions.

This shouldn’t have any impact on any projects that use react-uswds.
@RobKohr RobKohr requested a review from a team as a code owner November 20, 2023 18:33
@rswerve
Copy link
Contributor

rswerve commented Nov 20, 2023

Thanks @RobKohr! Take a look at the existing issue for this change; there might be a few more considerations before we can call it done.

@brandonlenz brandonlenz changed the title Add all component prop type definitons as exports feat: Add all component prop type definitons as exports Nov 20, 2023
@werdnanoslen
Copy link
Member

Thanks @RobKohr! Take a look at the existing issue for this change; there might be a few more considerations before we can call it done.

@RobKohr I'd love to get this merged in the next release if you have some time to review the above. Do you need any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants