Replies: 1 comment 1 reply
-
Maybe the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just wondering how you'd go about creating variants of variants, or if that's something that you definitely wouldn't do.
For example, if you had a Button component that had a type prop ('primary', 'secondary') and a size ('sm', 'md', 'lg').
Hopefully this will give you an idea of what I'm thinking:
Could I now somehow get something like:
<button className={styles.variant['primary-sm']}></button>
Or would you advise against doing this?
To summarise - I'm wondering if it would be possible for the styleVariants function to potentially take a base which is also a styleVariant, and you could then create variants from variants, like
primary-sm, primary-md, primary-lg, secondary-sm, secondary-md, secondary-lg
Beta Was this translation helpful? Give feedback.
All reactions