Replies: 1 comment
-
You can set this up in the For example// stitches.config.js
export const { styled, css } = createStitches({
theme: {
sizes: {
"sm": "12px",
"md" : "24px"
...
},
},
utils: {
size: (value) => ({
width: value,
height: value
})
}
}); Usage<MyComponent css={{ size: "sm" }} /> Some helpful docs |
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
-
I'm creating a TS component and I want to have
<MyComponent size="1em" />
or<MyComponent size="xs" />
. Size would get converted to width and height.I cannot come up with a way of doing this with just styled.
defaultVariants
requires you to have the variant defined above. Is there a way to have defaults for utils? Or are there any other suggestions?Beta Was this translation helpful? Give feedback.
All reactions