Closed midrizi closed 2 years ago
This is so weird.
By adding as const
the error goes away
fontWeights: {
light: '300' as const,
normal: 'normal' as const,
regular: '400' as const,
medium: '500' as const,
bold: '700' as const,
semiBold: 'bold' as const,
extraBold: '800' as const,
black: '900' as const,
}
Same with textTransform: 'uppercase' as const
otherwise won't work
yeah it's because font weights require strict values rather than any string.
you can also do as const
after the object itself
Hi @nandorojo, I'm getting an error when merging two theme object into one, since I don't want to have a duplicate code.
I have a
baseTheme
object that hasspacing
,custom fonts
- basically styles that are shared between light and dark modeGetting the following error:
Is there a way to get around this issue?