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?
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
intentvariant onbutton/1with several values, e.g.primary,secondary, etc. We've defined acolorvariant. 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_redin 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?