-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Collapsible] Make parameters in useCollapsilbe* hooks mandatory #752
Conversation
Netlify deploy preview |
@@ -22,11 +22,11 @@ const CollapsibleRoot = React.forwardRef(function CollapsibleRoot( | |||
forwardedRef: React.ForwardedRef<HTMLDivElement>, | |||
) { | |||
const { | |||
animated, | |||
animated = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added deafult props in component,to make it consistent with other components.
animated = true, |
animated = true, |
The default values are set in the hook. We can make it consistent and set everything on the component, though. In this case, I'd recommend making the hook parameters mandatory. |
@sai6855 Thanks for working on this 🙏 we discussed this and decided to generally assign default values to optional props in the component, and have hook params be required: #856 |
@sai6855, if you could make the parameters in the hook mandatory, we can merge this PR. |
Got it, I'll make the changes. Some how i missed this notification |
@michaldudak @mj12albert PR is ready for review |
Part of #856
Collapsible docs: https://deploy-preview-752--base-ui.netlify.app/components/react-collapsible/