-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.jsx
109 lines (105 loc) · 2.95 KB
/
index.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import React from 'react';
import ReactDOM from 'react-dom';
import AdapterMoment from '@mui/lab/AdapterMoment';
import LocalizationProvider from '@mui/lab/LocalizationProvider';
import { Route, HashRouter, Switch } from 'react-router-dom';
import { ThemeProvider, StyledEngineProvider, createTheme, alpha } from '@mui/material/styles';
import { grey } from "@mui/material/colors";
import StylesProvider from '@mui/styles/StylesProvider';
import alertifyjs from 'alertifyjs';
import App from './components/app/App';
import './index.scss';
import { BLUE, WHITE, BLACK } from './common/constants';
alertifyjs.defaults = {
...alertifyjs.defaults,
notifier: {
...alertifyjs.defaults.notifier,
delay: 3,
position: 'top-right',
},
};
const theme = createTheme();
const v5Theme = createTheme(theme, {
palette: {
primary: {
main: BLUE,
dark: BLUE,
light: BLUE,
contrastText: WHITE,
},
secondary: {
main: BLACK,
dark: BLACK,
light: BLACK,
contrastText: WHITE,
},
"default": {
main: grey[600],
dark: grey[600]
}
},
components: {
MuiButton: {
variants: [
{
props: { variant: "contained", color: "grey" },
style: {
color: theme.palette.getContrastText(theme.palette.grey[300])
}
},
{
props: { variant: "outlined", color: "grey" },
style: {
color: theme.palette.text.primary,
borderColor:
theme.palette.mode === "light"
? "rgba(0, 0, 0, 0.23)"
: "rgba(255, 255, 255, 0.23)",
"&.Mui-disabled": {
border: `1px solid ${theme.palette.action.disabledBackground}`
},
"&:hover": {
borderColor:
theme.palette.mode === "light"
? "rgba(0, 0, 0, 0.23)"
: "rgba(255, 255, 255, 0.23)",
backgroundColor: alpha(
theme.palette.text.primary,
theme.palette.action.hoverOpacity
)
}
}
},
{
props: { color: "grey", variant: "text" },
style: {
color: theme.palette.text.primary,
"&:hover": {
backgroundColor: alpha(
theme.palette.text.primary,
theme.palette.action.hoverOpacity
)
}
}
}
]
}
}
})
ReactDOM.render(
<HashRouter>
<StylesProvider injectFirst>
<StyledEngineProvider injectFirst>
<ThemeProvider theme={v5Theme}>
<LocalizationProvider dateAdapter={AdapterMoment}>
<Switch>
<Route exact path="/" component={App} />
<App />
</Switch>
</LocalizationProvider>
</ThemeProvider>
</StyledEngineProvider>
</StylesProvider>
</HashRouter>,
document.getElementById('root')
);