Skip to content

Trying to style the disclosure primitive as a secondary button. #517

Answered by SiTaggart
andioneto asked this question in General
Discussion options

You must be logged in to vote

Hi @andipants12

The docs could be clearer for the primitive. Essentially you can pass the DisclosurePrimitive an as prop, which can be any component really.

For example you can pass it a Button from Paste and it'll act like that button, whilst passing it's functional props via the hook. I've created a sandbox to demo it.

https://codesandbox.io/s/disclosure-example-dbhki

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@andioneto
Comment options

Answer selected by andioneto
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
Labels
None yet
2 participants