You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I don't want to require users to do this themselves. I thought about implementing my own AccordionItem by copying and pasting the Chakra implementation but some of the required pieces like AccordionItemProvider aren't exported.
The answer I've currently landed on is this, but is there a nicer way to accomplish this?:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I'd like to style an Accordion's
container
part depending on whether the item is open or not.It seems like the _expanded state is only passed to the
button
, so my initial thought of putting this in my theme didn't work:My next thought was that I could use a custom class and do something like this:
But I don't know an ergonomic way to get the
is-expanded
class onto the container. I could do something like:But I don't want to require users to do this themselves. I thought about implementing my own AccordionItem by copying and pasting the Chakra implementation but some of the required pieces like
AccordionItemProvider
aren't exported.The answer I've currently landed on is this, but is there a nicer way to accomplish this?:
Beta Was this translation helpful? Give feedback.
All reactions