Closed maecapozzi closed 2 years ago
I'm pretty sure this is caused by type widening. Change to this and it should be fixed:
const exampleVariants = {
primary: {
flexDirection: 'row',
flexWrap: 'nowrap'
},
secondary: {
flexDirection: 'column',
flexWrap: 'nowrap'
},
} as const;
I've been working with vanilla-extract and noticed the
flexDirection
andflexWrap
properties are not inferred correctly.See this code sandbox for a reproduction.
The following code causes a TS error:
Error
I believe this is due to CSS type not correctly typing these two css properties.