esp8266-react-framework/interface/src/App.js
Rick Watson 0c630f0f93 Upgrade to material ui 4
Add user management and roles - TBA
Menu Label Renames - TBA
2019-05-24 12:19:27 +01:00

52 lines
1.2 KiB
JavaScript

import React, { Component } from 'react';
import AppRouting from './AppRouting';
import SnackbarNotification from './components/SnackbarNotification';
import CssBaseline from '@material-ui/core/CssBaseline';
import blueGrey from '@material-ui/core/colors/blueGrey';
import indigo from '@material-ui/core/colors/indigo';
import orange from '@material-ui/core/colors/orange';
import red from '@material-ui/core/colors/red';
import green from '@material-ui/core/colors/green';
import { create } from 'jss';
import { StylesProvider, jssPreset } from '@material-ui/styles';
import {
MuiThemeProvider,
createMuiTheme
} from '@material-ui/core/styles';
// Our theme
const theme = createMuiTheme({
palette: {
primary: indigo,
secondary: blueGrey,
highlight_idle: blueGrey[900],
highlight_warn: orange[500],
highlight_error: red[500],
highlight_success: green[500],
},
});
// JSS instance
const jss = create(jssPreset());
class App extends Component {
render() {
return (
<StylesProvider jss={jss}>
<MuiThemeProvider theme={theme}>
<SnackbarNotification>
<CssBaseline />
<AppRouting />
</SnackbarNotification>
</MuiThemeProvider>
</StylesProvider>
)
}
}
export default App