Use sprinkles in a variant #538
Answered
by
nayaabkhan
nayaabkhan
asked this question in
Q&A
-
Hi, thanks a lot for the libraries! I'm enjoying the experience. I was trying to dive into Sprinkles and wondering if it is possible (yet) to use them with variants? import { styleVariants } from '@vanilla-extract/css'
import { atoms } from '@themes/atoms.css' // <- exports sprinkles
export const fontVariants = styleVariants({
heading: atoms({
fontSize: 'base',
fontWeight: 'bold'
}),
subheading: atoms({
fontSize: 'small',
color: 'text.muted',
}),
}) This results in a TS error: |
Beta Was this translation helpful? Give feedback.
Answered by
nayaabkhan
Dec 20, 2021
Replies: 1 comment 2 replies
-
I removed the usage of import { atoms } from '@themes/atoms.css'
export const fontVariants = {
heading: atoms({
fontSize: 'base',
fontWeight: 'bold'
}),
subheading: atoms({
fontSize: 'small',
color: 'text.muted',
}),
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
nayaabkhan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I removed the usage of
styleVariants
and I think it works as expected. Wondering if this is non-idiomatic in any way?