Skip to content

Conversation

@AdeboyeDN
Copy link

Changes:

  • Added defaultOpen prop to CollapseProps type with default value of false
  • Added new DefaultOpen story to demonstrate the functionality
  • Added tests to verify defaultOpen behavior and its interaction with the open prop

This PR adds the suggested behaviour of collapse, as proposed by @itaiperi, and it closes the issue #471

Example usage:

<Collapse defaultOpen>
  <Collapse.Title>I start open</Collapse.Title>
  <Collapse.Content>Visible by default</Collapse.Content>
</Collapse>

@netlify
Copy link

netlify bot commented Apr 20, 2025

👷 Deploy Preview for react-daisyui processing.

Name Link
🔨 Latest commit 4b815c6
🔍 Latest deploy log https://app.netlify.com/sites/react-daisyui/deploys/6805052e558d5e0008dfa6b6

1 similar comment
@netlify
Copy link

netlify bot commented Apr 20, 2025

👷 Deploy Preview for react-daisyui processing.

Name Link
🔨 Latest commit 4b815c6
🔍 Latest deploy log https://app.netlify.com/sites/react-daisyui/deploys/6805052e558d5e0008dfa6b6

@netlify
Copy link

netlify bot commented Apr 20, 2025

Deploy Preview for react-daisyui ready!

Name Link
🔨 Latest commit 4b815c6
🔍 Latest deploy log https://app.netlify.com/sites/react-daisyui/deploys/6805052e558d5e0008dfa6b6
😎 Deploy Preview https://deploy-preview-474--react-daisyui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AdeboyeDN
Copy link
Author

@benjitrosch Want to take a look?

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.

1 participant