Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB

  1. import React, { Component } from 'react';
  2. import AppRouting from './AppRouting';
  3. import SnackbarNotification from './components/SnackbarNotification';
  4. import JssProvider from 'react-jss/lib/JssProvider';
  5. import { create } from 'jss';
  6. import Reboot from 'material-ui/Reboot';
  7. import blueGrey from 'material-ui/colors/blueGrey';
  8. import indigo from 'material-ui/colors/indigo';
  9. import orange from 'material-ui/colors/orange';
  10. import red from 'material-ui/colors/red';
  11. import green from 'material-ui/colors/green';
  12. import {
  13. MuiThemeProvider,
  14. createMuiTheme,
  15. createGenerateClassName,
  16. jssPreset,
  17. } from 'material-ui/styles';
  18. // Our theme
  19. const theme = createMuiTheme({
  20. palette: {
  21. primary: indigo,
  22. secondary: blueGrey,
  23. highlight_idle: blueGrey[900],
  24. highlight_warn: orange[500],
  25. highlight_error: red[500],
  26. highlight_success: green[500],
  27. },
  28. });
  29. // JSS instance
  30. const jss = create(jssPreset());
  31. // Class name generator.
  32. const generateClassName = createGenerateClassName();
  33. class App extends Component {
  34. render() {
  35. return (
  36. <JssProvider jss={jss} generateClassName={generateClassName}>
  37. <MuiThemeProvider theme={theme}>
  38. <SnackbarNotification>
  39. <Reboot />
  40. <AppRouting />
  41. </SnackbarNotification>
  42. </MuiThemeProvider>
  43. </JssProvider>
  44. )
  45. }
  46. }
  47. export default App