Type 'string' is not assignable to type 'BoxSizing' after styled update from 11.11.0 to 11.11.5Β #3249
Open
Description
Current behavior:
React project has a compilation error when creating a div with boxSizing property using string value
Types of property 'boxSizing' are incompatible.
Type 'string' is not assignable to type 'BoxSizing | readonly NonNullable<BoxSizing | undefined>[] | readonly BoxSizing[] | undefined'.
To reproduce:
Create component that has boxSizing property defined with string 'content-box'
const CardInputContainer = styled.div(() => ({
boxSizing: 'content-box',
}))
Expected behavior:
Project compiles
Environment information:
react
version: 18.2.0@emotion/react
version: 11.11.3