[Accordion] different ItemIndicator icons based on the prop defined on Root element. #2630
Unanswered
vipindigiqt
asked this question in
Q&A
Replies: 1 comment
-
I recommend creating your own context provider for the variant prop and read it in your component You could also read the accordion item context and combine this as needed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building a re-usable Accordion having 3 variants.
All of the 3 variants are having different look and feel in terms of the design like different icons, padding, etc.
I'm exporting the different parts of the Accordion components separately and extending the Root by adding a
variant
prop with all my variants and planning to pass that as a data-attribute to target using CSS.I'm stuck at how to define different
ItemIndicator
icons as they all are different in each variant, also the icons are different foropen
andclosed
state of the accordion.Any suggestions to achieve the same?
Here's the simplified code.
Beta Was this translation helpful? Give feedback.
All reactions