Should empty variants define as types? #864
Unanswered
Tatametheus
asked this question in
Ideas
Replies: 1 comment
-
I think it's fine to leave them as empty. At this point youre just creating the "component interface". Even if you add no styles, this is how Stitches knows the variants that are available. We cant infer that from the compound variants. The alternative would be for users to manually type their variants, but that kind of ruins the magic. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's look an example
In the example above, the status and appearance need to to compound, and only change the background color or color. Since I cant directly define those colors in status, I need to leave those variants to empty.
What I mean is can we remove the status variants and put it on the styled function?
Some thing like this
Simple way to require a variant is kind of similar with my opinion. Define the component types first and set it to styled function.
Beta Was this translation helpful? Give feedback.
All reactions