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

fix: drawer trigger "as component" props #2087

Merged
merged 3 commits into from Jun 15, 2023

Conversation

mleralec
Copy link
Contributor

related to: #2083

The Drawer.Trigger throw errors when you add props of the "as" component:

<Drawer.Trigger as={Button} variant="primary" state={state}>...</Drawer.Trigger>

Here, the prop "variant" will throw an error, if you remove it, it works.

This is because the Drawer.Trigger component doesn't use our custom forwardRef type (this type inject props of the as component in the current component, here add the props of the Button in the Drawer.Trigger)

@mleralec mleralec requested a review from a team June 14, 2023 14:36
@github-actions
Copy link

👀 Visit Preview

Copy link
Contributor

@theo-mesnil theo-mesnil left a comment

Choose a reason for hiding this comment

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

👏🏻

@theo-mesnil theo-mesnil added this to the Version 5 RC milestone Jun 15, 2023
@mleralec mleralec force-pushed the fix-drawer-trigger-as-props branch from d66cf9d to bec7e47 Compare June 15, 2023 08:25
@theo-mesnil theo-mesnil merged commit 60a7898 into master Jun 15, 2023
9 checks passed
@theo-mesnil theo-mesnil deleted the fix-drawer-trigger-as-props branch June 15, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants