Skip to content

Conversation

@DiegoAndai
Copy link
Member

Fixes #34068

When this was implemented initially (#38168), an error was reported (#38274), which prompted it to be reverted.

The issue was with styled(Box), but since then, we've added the no-styled-box rule, so instead of the proposed workaround I added the following diff to the upgrade guide:

-const StyledBox = styled(Box)`
+const StyledDiv = styled('div')`
   color: white;
 `;

I also added the type cast, just in case.

@DiegoAndai DiegoAndai added the breaking change Introduces changes that are not backward compatible. label Aug 20, 2024
@DiegoAndai DiegoAndai self-assigned this Aug 20, 2024
@mui-bot
Copy link

mui-bot commented Aug 20, 2024

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 1d818af

Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ very nice

@DiegoAndai DiegoAndai merged commit c84d795 into mui:next Aug 20, 2024
@DiegoAndai DiegoAndai deleted the box-typemap branch August 20, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible. component: Box The React component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Box] Type error when too many properties exist in JSX.IntrinsicElements

3 participants