How to set a property based on the value of another property? #663
-
For example, let's say we have tokens for:
How to implement the following logic?
|
Beta Was this translation helpful? Give feedback.
Answered by
lucasbozzo
Jul 11, 2021
Replies: 1 comment 2 replies
-
Hi @iam-yan, I believe you could use variants along with defaultVariants and compoundVariants. Use |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
peduarte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @iam-yan,
I believe you could use variants along with defaultVariants and compoundVariants. Use
variants
to create the height and borderRadius options. With compoundVariants you create the "if" cases, and with defaultVariants you could define the "else" statement. Check out this sandbox. I hope that helps.