Skip to content

Commit

Permalink
[example] Fix next.js CSS blink
Browse files Browse the repository at this point in the history
Closes mui#7977
  • Loading branch information
oliviertassinari committed Aug 31, 2017
1 parent fa469ff commit cd0f883
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion examples/nextjs/components/withRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ function withRoot(BaseComponent) {

render() {
return (
<MuiThemeProvider theme={this.styleContext.theme}>
<MuiThemeProvider
theme={this.styleContext.theme}
sheetsManager={this.styleContext.sheetsManager}
>
<AppWrapper>
<BaseComponent {...this.props} />
</AppWrapper>
Expand Down
5 changes: 3 additions & 2 deletions examples/nextjs/styles/getContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
import { create } from 'jss';
import preset from 'jss-preset-default';
import { SheetsRegistry } from 'react-jss';
import createMuiTheme from 'material-ui/styles/createMuiTheme';
import { purple, green } from 'material-ui/colors';
import { createMuiTheme } from 'material-ui/styles';
import purple from 'material-ui/colors/purple';
import green from 'material-ui/colors/green';
import createGenerateClassName from 'material-ui/styles/createGenerateClassName';

const theme = createMuiTheme({
Expand Down

0 comments on commit cd0f883

Please sign in to comment.