adding mui theme to index js

Solutions on MaxInterview for adding mui theme to index js by the best coders in the world

showing results for - "adding mui theme to index js"
Michela
07 Jan 2019
1import React from 'react';
2import { render } from 'react-dom';
3import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
4import CssBaseline from "@material-ui/core/CssBaseline";
5import Root from './Root';
6
7const theme = createMuiTheme();
8
9function App() {
10  return (
11    <MuiThemeProvider theme={theme}>
12      <React.Fragment>
13        <CssBaseline />
14        <Root />
15      </React.Fragment>
16    </MuiThemeProvider>
17  );
18}
19
20render(<App />, document.querySelector('#app'));