cva() responsive variants? #1413
-
Subjectcva() recipes DescriptionOn the "Recipes" page under Limitations, the docs say this:
But if you try to use breakpoints in your const myRecipe = cva({
base: {
width: "100%",
},
variants: {
type: {
something: {
md: {
width: "50%",
},
},
somethingElse: {
md: {
width: "75%",
},
},
},
},
}); Am I misunderstanding what "responsive" means here or is the documentation incorrect? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you write the responsive styles within the variant, it should work as expected. What we mean in the docs is if you do: myRecipe({ type: { md: "something", lg: "somethingElse" } }) This will not work. |
Beta Was this translation helpful? Give feedback.
If you write the responsive styles within the variant, it should work as expected.
What we mean in the docs is if you do:
This will not work.