Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type 'string' is not assignable to type 'BoxSizing' after styled update from 11.11.0 to 11.11.5 #3249

Open
maciejwitwicki opened this issue Aug 28, 2024 · 0 comments

Comments

@maciejwitwicki
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant