mui / base-ui

Base UI is an open-source library of accessible, unstyled UI components for React.
MIT License
292 stars 47 forks source link

[Collapsible] Add missing defaults to Collapsible* components #752

Open sai6855 opened 1 month ago

sai6855 commented 1 month ago

Part of https://github.com/mui/base-ui/issues/856

Added missing default values of props for Collapsible* components.

Collapsible docs: https://deploy-preview-752--base-ui.netlify.app/components/react-collapsible/

mui-bot commented 1 month ago

Netlify deploy preview

https://deploy-preview-752--base-ui.netlify.app/

Generated by :no_entry_sign: dangerJS against 3df4e29bbc231d17f2453b341a00a3a0ac62b1cf

michaldudak commented 2 weeks ago

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.

mj12albert commented 3 days ago

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: https://github.com/mui/base-ui/issues/856

michaldudak commented 1 day ago

@sai6855, if you could make the parameters in the hook mandatory, we can merge this PR.

sai6855 commented 1 day ago

@sai6855, if you could make the parameters in the hook mandatory, we can merge this PR.

Got it, I'll make the changes. Some i missed this notification