-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[ButtonGroup] CardActions spacing is not working #29819
Comments
I guess the regression might be introduced by @vicasas in #24604: 1842ce8#diff-8fd90cfbeeb4f4c26dee82bfb29db2339a9908640b9368edbffa8cf37e4ba745R43 Not sure why |
@fkorotkov Thanks for creating the PR. I am afraid your codesandbox is empty. Would you update it? Thanks. |
@hbjORbj my bad! Just recreated it and made sure it got saved. Seems I'm to used to IntelliJ's auto-save so I didn't press |
I think it is changed due to the emotion warning to not use in v6, we will probably fix this with |
For anyone still using MUI v5 and facing this issue, you can manually override the styling when creating your theme: createTheme({
components: {
MuiCardActions: {
styleOverrides: {
root: ({ theme }) => ({
'& > :not(:first-of-type)': {
marginLeft: 'unset',
},
gap: theme.spacing(1),
}),
},
},
},
}) Since the support for createTheme({
components: {
MuiCardActions: {
styleOverrides: {
root: ({ theme }) => ({
'& > :not(:first-of-type)': {
marginLeft: 'unset',
},
'& > :not(:first-child)': {
marginLeft: theme.spacing(1),
},
}),
},
},
},
}) |
Duplicates
Latest version
Current behavior 😯
Here is a sandbox where I took SplitButton example from the documentation and added it as an action to a card.
On v5 version spacing is not working between a Button and the ButtonGroup. With v4 everything worked fine.
Expected behavior 🤔
Expect to see a spacing between every action.
Steps to reproduce 🕹
Please check out a sandbox here: https://codesandbox.io/s/magical-robinson-cvkwt?file=/src/Demo.tsx
Context 🔦
I'm trying to upgrade from v4 to v5 and facing some issues.
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: