-
-
Notifications
You must be signed in to change notification settings - Fork 132
/
themes.ts
66 lines (61 loc) · 1.35 KB
/
themes.ts
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
import { ThemeOptions } from '@mui/material/styles';
import { deepmerge } from '@mui/utils';
import { Themes } from './types';
const sharedTheme = {
palette: {
background: {
default: '#fafafa',
paper: '#fff',
},
},
components: {
MuiButtonBase: {
defaultProps: {
disableRipple: true,
},
},
MuiDivider: {
styleOverrides: {
vertical: {
marginRight: 10,
marginLeft: 10,
},
// TODO: open issue for missing "horizontal" CSS rule
// in Divider API - https://mui.com/material-ui/api/divider/#css
middle: {
marginTop: 10,
marginBottom: 10,
width: '80%',
},
},
},
},
} as ThemeOptions; // the reason for this casting is deepmerge return type
// TODO (Suren): replace mui-utils-deepmerge with lodash or ramda deepmerge
const themes: Record<Themes, ThemeOptions> = {
light: deepmerge(sharedTheme, {
palette: {
mode: 'light',
background: {
default: '#fafafa',
paper: '#fff',
},
primary: {
main: '#3f51b5',
},
},
}),
dark: deepmerge(sharedTheme, {
palette: {
mode: 'dark',
background: {
default: '#111',
paper: '#171717',
},
primary: {
main: '#333',
},
},
}),
};
export default themes;