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

[system] Don't spread props to DOM for string tags #33761

Merged
merged 6 commits into from Aug 4, 2022

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Aug 2, 2022

closes #29320, closes #29207

Finally found a nice fix. If the tag is a string, we just reset our shouldForwardProp to undefined and let emotion/styled-components figure it out 👏.

They uses @emotion/is-prop-valid which filters out the sx prop and ownerState by default.


@siriwatknp siriwatknp added the package: system Specific to @mui/system label Aug 2, 2022
@mui-bot
Copy link

mui-bot commented Aug 2, 2022

Details of bundle changes

Generated by 🚫 dangerJS against 13398a3

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Niceee 🥇 And we are doing it only for the component that don't have specified slot/component name which is exactly what we need 👍

@siriwatknp siriwatknp merged commit 1dca946 into mui:master Aug 4, 2022
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system
Projects
None yet
3 participants