Skip to content

How to set a property based on the value of another property? #663

Answered by lucasbozzo
iam-yan asked this question in Help
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@iam-yan
Comment options

@peduarte
Comment options

Answer selected by peduarte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants