forked from dunky11/react-saas-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.js
127 lines (121 loc) · 2.73 KB
/
theme.js
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import { createTheme, responsiveFontSizes, adaptV4Theme } from "@mui/material";
// colors
const primary = "#b3294e";
const secondary = "#4829B2";
const black = "#343a40";
const darkBlack = "rgb(36, 40, 44)";
const background = "#f5f5f5";
const warningLight = "rgba(253, 200, 69, .3)";
const warningMain = "rgba(253, 200, 69, .5)";
const warningDark = "rgba(253, 200, 69, .7)";
// border
const borderWidth = 2;
const borderColor = "rgba(0, 0, 0, 0.13)";
// breakpoints
const xl = 1920;
const lg = 1280;
const md = 960;
const sm = 600;
const xs = 0;
// spacing
const spacing = 8;
const theme = createTheme(adaptV4Theme({
palette: {
primary: { main: primary },
secondary: { main: secondary },
common: {
black,
darkBlack
},
warning: {
light: warningLight,
main: warningMain,
dark: warningDark
},
// Used to shift a color's luminance by approximately
// two indexes within its tonal palette.
// E.g., shift from Red 500 to Red 300 or Red 700.
tonalOffset: 0.2,
background: {
default: background
},
spacing
},
breakpoints: {
// Define custom breakpoint values.
// These will apply to Material-UI components that use responsive
// breakpoints, such as `Grid` and `Hidden`. You can also use the
// theme breakpoint functions `up`, `down`, and `between` to create
// media queries for these breakpoints
values: {
xl,
lg,
md,
sm,
xs
}
},
border: {
borderColor: borderColor,
borderWidth: borderWidth
},
overrides: {
MuiExpansionPanel: {
root: {
position: "static"
}
},
MuiTableCell: {
root: {
paddingLeft: spacing * 2,
paddingRight: spacing * 2,
borderBottom: `${borderWidth}px solid ${borderColor}`,
[`@media (max-width: ${sm}px)`]: {
paddingLeft: spacing,
paddingRight: spacing
}
}
},
MuiDivider: {
root: {
backgroundColor: borderColor,
height: borderWidth
}
},
MuiPrivateNotchedOutline: {
root: {
borderWidth: borderWidth
}
},
MuiListItem: {
divider: {
borderBottom: `${borderWidth}px solid ${borderColor}`
}
},
MuiDialog: {
paper: {
width: "100%",
maxWidth: 430,
marginLeft: spacing,
marginRight: spacing
}
},
MuiTooltip: {
tooltip: {
backgroundColor: darkBlack
}
},
MuiExpansionPanelDetails: {
root: {
[`@media (max-width: ${sm}px)`]: {
paddingLeft: spacing,
paddingRight: spacing
}
}
}
},
typography: {
useNextVariants: true
}
}));
export default responsiveFontSizes(theme);