Skip to content

Ability to toggle visible to true or false on Disclosures #1041

Answered by richbachman
bvsillorequez asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @bvsillorequez

One solution might be to use the useDisclosureState hook and state prop: https://paste.twilio.design/components/disclosure#using-state-hooks

That allows you to tie into the hook happening within the Disclosure. I've set up a very simple example that might help you out here: https://codesandbox.io/s/disclosure-state-ebl15?file=/src/index.tsx

Let us know if that helps.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by corinne-nagel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants