Closed nukeop closed 5 months ago
Let's say I have a cva style defined like this:
const contextMenuItem = cva( 'flex', { variants: { intent: { warning: 'text-red-500', }, active: { true: 'bg-stone-100', }, }, }, );
So now I'd like to do something like this: if active is set to true, then intent with the value of warning should also apply bg-red-100 in addition to the style shown here. Is it possible, using the library in its current state?
active
true
intent
warning
bg-red-100
Nvm, I realized compound variants can do that. Thanks for thinking of everything.
how did you manage to do this? i'm struggling to come up with a solution with dark mode components
Let's say I have a cva style defined like this:
So now I'd like to do something like this: if
active
is set totrue
, thenintent
with the value ofwarning
should also applybg-red-100
in addition to the style shown here. Is it possible, using the library in its current state?