Skip to content

v5.0.0-alpha.8

Pre-release
Pre-release
Compare
Choose a tag to compare
@oliviertassinari oliviertassinari released this 31 Aug 16:22
Aug 31, 2020

Big thanks to the 19 contributors who made this release possible.
Here are some highlights ✨:

const theme = createMuiTheme({
  components: {
    MuiIconButton: {
      defaultProps: {
        size: 'small',
      },
      styleOverrides: {
        sizeSmall: {
          marginLeft: 4,
          marginRight: 4,
          padding: 12,
        },
      },
    },
  },
});

@material-ui/[email protected]

Breaking changes

  • [theme] Rename theme keys to defaultProps and styleOverrides (#22347) @mnajdova

  • [theme] Restructure component definitions (#22293) @mnajdova
    The components' definition inside the theme were restructure under the components key, to allow people easier discoverability about the definitions regarding one component.

    1. props
    import { createMuiTheme } from '@material-ui/core/styles';
    
    const theme = createMuitheme({
    -  props: {
    -    MuiButton: {
    -      disableRipple: true,
    -    },
    -  },
    +  components: {
    +    MuiButton: {
    +      defaultProps: {
    +        disableRipple: true,
    +      },
    +    },
    +  },
    });
    1. overrides
    import { createMuiTheme } from '@material-ui/core/styles';
    
    const theme = createMuitheme({
    -  overrides: {
    -    MuiButton: {
    -      root: { padding: 0 },
    -    },
    -  },
    +  components: {
    +    MuiButton: {
    +      styleOverrides: {
    +        root: { padding: 0 },
    +      },
    +    },
    +  },
    });

    Note that if you don't have the time to upgrade the structure of the theme, you
    can use the adaptV4Theme() adapter.

  • [GridList] Rename to ImageList (#22311) @mbrookes

  • [GridList] Rename Tile to Item (#22385) @mbrookes
    Rename the GridList components to ImageList to align with the current Material Design naming.

    -import GridList from '@material-ui/core/GridList';
    -import GridListTile from '@material-ui/core/GridListTile';
    -import GridListTileBar from '@material-ui/core/GridListTileBar';
    +import ImageList from '@material-ui/core/ImageList';
    +import ImageListItem from '@material-ui/core/ImageListItem';
    +import ImageListItemBar from '@material-ui/core/ImageListItemBar';
    
    -<GridList>
    -  <GridListTile>
    +<ImageList>
    +  <ImageListItem>
        <img src="file.jpg" alt="Image title" />
    -    <GridListTileBar
    +    <ImageListItemBar
          title="Title"
          subtitle="Subtitle"
        />
    -  </GridListTile>
    -</GridList>
    +  </ImageListItem>
    +</ImageList>

Changes

@material-ui/[email protected]

  • [docs] Add IntelliSense for each class in the classes prop (#22312) @eps1lon

@material-ui/[email protected]

@material-ui/[email protected]

Docs

Core