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

[Checkbox][material] Add size classes #38182

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

michaldudak
Copy link
Member

@michaldudak michaldudak commented Jul 27, 2023

Places the .MuiCheckbox-sizeSmall and .MuiCheckbox-sizeMedium class on checkboxes where size="small" and size="medium", respectively, similarly to how Button behaves.

Closes #38176.

@michaldudak michaldudak added bug 🐛 Something doesn't work component: checkbox This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels Jul 27, 2023
@mui-bot
Copy link

mui-bot commented Jul 27, 2023

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 4b5b270

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Nice! What do you think about adding sizeMedium as well? We could do size${capitalize(size)} like we have for the color prop, which would add the class for size overrides as well

@michaldudak michaldudak changed the title [Checkbox][material] Add sizeSmall class on small checkboxes [Checkbox][material] Add size classes Jul 31, 2023
@michaldudak
Copy link
Member Author

Yeah, I somehow incorrectly assumed that we don't apply classes for default states, but that's not true. It's updated now.

@michaldudak michaldudak merged commit a18f64a into mui:master Aug 2, 2023
21 checks passed
@michaldudak michaldudak deleted the checkbox-size-class branch August 2, 2023 08:21
richbustos pushed a commit that referenced this pull request Aug 4, 2023
@mogrady88
Copy link
Contributor

I hate to keep piling on but the Radio component seems to behave the same way the Checkbox one does in regards to size="small". Is there any way to get that one remediated as well? Alternatively I can create a separate issue

richbustos pushed a commit that referenced this pull request Aug 7, 2023
@DiegoAndai
Copy link
Member

@mogrady88 thanks for the heads up! I created an issue to track this: #38397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: checkbox This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Checkbox][material] size="small" is not receiving any appropriate className to style off of
4 participants