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
I've been following the docs and been unable to get a compound variant to work. It seems that there may be a level missing or, more likely, I'm complete misunderstanding them.
Any examples you can point to would be great.
Here's what we're doing. We've defined an intent variant on button/1 with several values, e.g. primary, secondary, etc. We've defined a color variant. Our app has two main areas and we differentiate them, in part, based on color.
So, I want a primary red button, I can do <.button intent="primary" color="red" ... My understanding of a compound variant would allow us to specify primary_red in some manner to include classes from both intent="primary" and color="red".
How do we indicate in the instance of the function component that we want a compound variant?
The text was updated successfully, but these errors were encountered:
I've been following the docs and been unable to get a compound variant to work. It seems that there may be a level missing or, more likely, I'm complete misunderstanding them.
Any examples you can point to would be great.
Here's what we're doing. We've defined an
intent
variant onbutton/1
with several values, e.g.primary
,secondary
, etc. We've defined acolor
variant. Our app has two main areas and we differentiate them, in part, based on color.So, I want a primary red button, I can do
<.button intent="primary" color="red" ...
My understanding of a compound variant would allow us to specifyprimary_red
in some manner to include classes from both intent="primary" and color="red".How do we indicate in the instance of the function component that we want a compound variant?
The text was updated successfully, but these errors were encountered: