yarn material-ui 1.0.0-beta.12

latest releases: 0.20.2, 0.20.1, 1.0.0-beta.47...
6 years ago
Sep 24, 2017

Big thanks to the 25 contributors who made this release possible.

Wait, what?! We have been merging 52 pull requests from 25 different people in just 6 days (and closed 60 issues). This is a new record for the project. The v1-beta version is definitely getting traction.
Thanks for the support!

Here are some highlights ✨:

  • Introduction of the first codemods for the v0.x -> v1.x migration as well as a documentation page. @vividh (#8311, #8333, #8314)
  • The TypeScript definitions made an important step forward with more than 10 PRs merged. @pelotom @sebald @xaviergonz and more
  • Wondering how Material-UI compares to the other solutions out there?
    We have created a documentation page to stress the tradeoffs taken. (#8319)
  • material-ui@next has just crossed react-toolbox in terms of downloads on npm.

Breaking change

const muiTheme = createMuiTheme({
  breakpoints: {
-    breakpointsMap: {
+    values: {
      xs: 360,
      sm: 768,
      md: 992,
      lg: 1200,
      xl: 1440,
    },
  },
});
  paperWidthXs: {
-    maxWidth: theme.breakpoints.getWidth('xs'),
+    maxWidth: theme.breakpoints.values.xs,
  },
  • [typescript] Improve type definition for withStyles (#8320) @pelotom

@pelotom did a great job improving the withStyles typings, such that less generics are required to be written! Most notably, you no longer have to pass a map of class names to withStyles:

- withStyles<{ root: string; }>(...)
+ withStyles(...)

Also, props can now be set when applying the HOC:

- const StyledComponent = withStyles<
-   StyledComponentProps,
-   StyledComponentClassNames
- >(styles)(Component);
+ const StyledComponent = withStyles(styles)<StyledComponentProps>(
+   ({ classes, text }) => (
+     <div className={classes.root}>
+       {text}
+     </div>
+   )
+ );

When withStyles() is used as a decorator and strictNullChecks is enabled, one has to use the ! operator to access classes from within the class.

Component Fixes / Enhancements

Docs

Core

Don't miss a new material-ui release

NewReleases is sending notifications on new releases.