|
1 |
| -import { Container, Drawer, Grid } from '@material-ui/core'; |
| 1 | +import React from 'react'; |
| 2 | +import { Container, Drawer, Grid, ThemeProvider } from '@material-ui/core'; |
| 3 | +import { createMuiTheme } from '@material-ui/core/styles'; |
2 | 4 | import Routes from '@routes';
|
3 | 5 | import { StoreProvider } from '@stores';
|
4 |
| -import React from 'react'; |
5 | 6 | import { drawerStyle, wrapperStyle } from '@styles';
|
6 | 7 | import './App.css';
|
7 | 8 |
|
| 9 | +const theme = createMuiTheme({ |
| 10 | + palette: { |
| 11 | + primary: { |
| 12 | + light: '#757ce8', |
| 13 | + main: '#3f50b5', |
| 14 | + dark: '#002884', |
| 15 | + contrastText: '#fff', |
| 16 | + }, |
| 17 | + secondary: { |
| 18 | + light: '#ff7961', |
| 19 | + main: '#f44336', |
| 20 | + dark: '#ba000d', |
| 21 | + contrastText: '#000', |
| 22 | + }, |
| 23 | + }, |
| 24 | +}); |
| 25 | + |
8 | 26 | const App: React.FC = () => {
|
9 | 27 | var isIE11 = !!window.MSInputMethodContext;
|
10 | 28 | if (isIE11) alert('(This site is not optimized for IE. Please use Chrome or Firefox or Edge)');
|
11 | 29 | const wrapperCSS = wrapperStyle();
|
12 | 30 | const drawerCSS = drawerStyle();
|
13 | 31 | return (
|
14 | 32 | <StoreProvider>
|
15 |
| - <Drawer anchor="right" classes={drawerCSS} /> |
16 |
| - <main className={wrapperCSS.root}> |
17 |
| - <Container maxWidth="lg" className={wrapperCSS.container}> |
18 |
| - <Grid container spacing={3}> |
19 |
| - <Routes /> |
20 |
| - </Grid> |
21 |
| - </Container> |
22 |
| - </main> |
| 33 | + <ThemeProvider theme={theme}> |
| 34 | + <Drawer anchor="right" classes={drawerCSS} /> |
| 35 | + <main className={wrapperCSS.root}> |
| 36 | + <Container maxWidth="lg" className={wrapperCSS.container}> |
| 37 | + <Grid container spacing={3}> |
| 38 | + <Routes /> |
| 39 | + </Grid> |
| 40 | + </Container> |
| 41 | + </main> |
| 42 | + </ThemeProvider> |
23 | 43 | </StoreProvider>
|
24 | 44 | );
|
25 | 45 | };
|
|
0 commit comments