Skip to content

[core] Support merging of className and style from theme #45975

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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Apr 21, 2025

closes: #45919

@sai6855 sai6855 marked this pull request as draft April 21, 2025 14:39
@sai6855 sai6855 added new feature New feature or request package: material-ui Specific to @mui/material customization: theme Centered around the theming features labels Apr 21, 2025
@mui-bot
Copy link

mui-bot commented Apr 21, 2025

Netlify deploy preview

https://deploy-preview-45975--material-ui.netlify.app/

@mui/material/DefaultPropsProvider: parsed: +39.32% , gzip: +34.59%
@mui/material/CssBaseline: parsed: +0.86% , gzip: +0.93%
@mui/material/useMediaQuery: parsed: +3.62% , gzip: +3.54%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 2b53472

@sai6855
Copy link
Contributor Author

sai6855 commented Apr 22, 2025

@siriwatknp This PR merges className and style from theme at component level and at slotProps level. here are the tests that validates this https://github.com/mui/material-ui/pull/45975/files#diff-4c87e5840e6a483a36b1ad4e04bc610d9c56f6fef21df6287a7a95439b993944

What do you think about the logic? if you are fine with implementaion, i'll create documention for mergeClassNameAndStyle key

@sai6855 sai6855 requested a review from siriwatknp April 22, 2025 07:51
@sai6855 sai6855 marked this pull request as ready for review April 22, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features new feature New feature or request package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui] className and style from theme default props are not merged with the component slotProps
2 participants