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

58 lines
1.3 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';
import JssProvider from 'react-jss/lib/JssProvider';
import { create } from 'jss';
import Reboot from 'material-ui/Reboot';
import blueGrey from 'material-ui/colors/blueGrey';
import indigo from 'material-ui/colors/indigo';
import orange from 'material-ui/colors/orange';
import red from 'material-ui/colors/red';
import green from 'material-ui/colors/green';
import {
MuiThemeProvider,
createMuiTheme,
createGenerateClassName,
jssPreset,
} from 'material-ui/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 name generator.
const generateClassName = createGenerateClassName();
class App extends Component {
render() {
return (
<JssProvider jss={jss} generateClassName={generateClassName}>
<MuiThemeProvider theme={theme}>
2018-03-03 22:41:57 +00:00
<SnackbarNotification>
<Reboot />
<AppRouting />
</SnackbarNotification>
</MuiThemeProvider>
</JssProvider>
)
}
}
export default App