Skip to content

[Button] Apply default size styles #42502

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Jun 3, 2024

Fixes #32427

This PR applies the sizes for the default variant as a base style. This way adding custom variants won't break the size prop.

@mnajdova mnajdova added component: button This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material customization: css Design CSS customizability breaking change labels Jun 3, 2024
@@ -215,7 +215,6 @@ const ButtonRoot = styled(ButtonBase, {
{
props: {
size: 'small',
variant: 'text',
Copy link
Member Author

Choose a reason for hiding this comment

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

The text variant is default, so in principle this shouldn't change a lot the behavior. It only rely matters when a custom variant is being created.

@mui-bot
Copy link

mui-bot commented Jun 3, 2024

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 8926187

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 21, 2024
@ZeeshanTamboli
Copy link
Member

@mnajdova Should we consider this PR? I can work on it. The related issue #32427 is active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: button This is the name of the generic UI component, not the React module! customization: css Design CSS customizability package: material-ui Specific to @mui/material PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui][Button] Variants don't consume the size prop
3 participants