Open FourwingsY opened 1 month ago
add this kinds of things throws type error.
variants: [ { props: { focused: true }, style: { '--label-color': theme.colors.primary70, '--border-color': theme.colors.primary70, }, }, ]
'--label-color': string is inferred as CSSOthersObject which is { [selector: string]: CSSObject<Props>; }
'--label-color': string
CSSOthersObject
{ [selector: string]: CSSObject<Props>; }
Warning saids, theme.colors.primary70 is not an CSSObject<Props>
CSSObject<Props>
While, if I put some valid css keys with it,
variants: [ { props: { focused: true }, style: { textIndent: 0, // <<< '--label-color': theme.colors.primary70, '--border-color': theme.colors.primary70, }, }, ]
Type error disappears.
'--label-color': string should be accepted as a valid key and value without other css properties.
No response
in VSCode
Search keywords: css, style, CSSObject, key
Steps to reproduce
add this kinds of things throws type error.
Current behavior
'--label-color': string
is inferred asCSSOthersObject
which is{ [selector: string]: CSSObject<Props>; }
Warning saids, theme.colors.primary70 is not an
CSSObject<Props>
While, if I put some valid css keys with it,
Type error disappears.
Expected behavior
'--label-color': string
should be accepted as a valid key and value without other css properties.Context
No response
Your environment
in VSCode
Search keywords: css, style, CSSObject, key