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

[Grid] Add system props #24499

Merged
merged 4 commits into from
Jan 21, 2021
Merged

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Jan 19, 2021

BREAKING CHANGE

  • [Grid] The props: alignItems, alignContent, justifyContent and their classes and style overrides keys were removed: "align-items-xs-center", "align-items-xs-flex-start", "align-items-xs-flex-end", "align-items-xs-baseline", "align-content-xs-center", "align-content-xs-flex-start", "align-content-xs-flex-end", "align-content-xs-space-between", "align-content-xs-space-around", "justify-content-xs-center", "justify-content-xs-flex-end", "justify-content-xs-space-between", "justify-content-xs-space-around" and "justify-content-xs-space-evenly". These props are now considered part of the system, not on the Grid component itself. If you still wish to add overrides for them, you can use the theme.components.MuiGrid.variants options. For example:

    const theme = createMuiTheme({
      components: {
        MuiGrid: {
    -     styleOverrides: {
    -       "align-items-xs-flex-end": {
    -         marginTop: '20px',
    -       },
    -     },
    +     variants: {
    +       props: { alignItems: "flex-end" },
    +       style: {
    +         marginTop: '20px',
    +       },
    +     }],
        },
      },
    });

This PR adds the system props on the Grid component.

Another iteration on #24485

@@ -1,19 +1,5 @@
{
"props": {
"alignContent": {
Copy link
Member Author

Choose a reason for hiding this comment

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

These prosp are already part of the system, no need for duplication

@mui-pr-bot
Copy link

mui-pr-bot commented Jan 19, 2021

@material-ui/core: parsed: -0.25% 😍, gzip: -0.19% 😍
@material-ui/lab: parsed: -0.20% 😍, gzip: -0.17% 😍

Details of bundle changes

Generated by 🚫 dangerJS against 886f82c

@oliviertassinari oliviertassinari added component: Grid The React component. new feature New feature or request labels Jan 19, 2021
@mnajdova mnajdova merged commit f26c765 into mui:next Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: Grid The React component. new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants