get variant list from CVA definition
Hey all I'm using
class-variance-authority
to define component styles. Wondering if there's a way to reuse the defined variant keys. E.g.
I'd like to get the variant keys as an array of strings.3 Replies
You can define an object with your variants, and then pass it to
cva
:
@Daryl I'm sure I tried this and got type errors! Works perfectly now, thank you :)