-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy paththeme.ts
45 lines (41 loc) · 1.19 KB
/
theme.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
import { createTheme, responsiveFontSizes } from "@material-ui/core";
import { Palette } from "@material-ui/core/styles/createPalette";
import { Shadows } from "@material-ui/core/styles/shadows";
// import { Shadows } from "@material-ui/core/styles/shadows";
import { overrides } from "./overrides";
import { darkPalette, lightPalette } from "./palette";
import { props } from "./props";
import { shape, breakpoints } from "./other";
import { typography } from "./typography";
import * as customColors from "./colors";
const baseTheme = (palette: Palette) => ({
breakpoints,
props,
overrides: overrides(palette),
typography,
shape,
shadows: Array(25).fill("none") as Shadows,
});
declare module "@material-ui/core/styles" {
interface Theme {
customColors: typeof customColors;
}
// allow configuration using `createMuiTheme`
interface ThemeOptions {
customColors?: typeof customColors;
}
}
export const lightTheme = responsiveFontSizes(
createTheme({
customColors,
palette: lightPalette,
...baseTheme(lightPalette),
})
);
export const darkTheme = responsiveFontSizes(
createTheme({
customColors,
palette: darkPalette,
...baseTheme(darkPalette),
})
);