esp8266-react-framework/interface/src/App.js

52 lines
1.2 KiB
JavaScript
Raw Normal View History

import React, { Component } from 'react';
import AppRouting from './AppRouting';
2018-03-03 22:41:57 +00:00
import SnackbarNotification from './components/SnackbarNotification';
2018-05-18 22:29:14 +00:00
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
2018-05-18 22:29:14 +00:00
} 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}>
2018-03-03 22:41:57 +00:00
<SnackbarNotification>
2018-05-18 22:29:14 +00:00
<CssBaseline />
2018-03-03 22:41:57 +00:00
<AppRouting />
</SnackbarNotification>
</MuiThemeProvider>
</StylesProvider>
)
}
}
export default App