-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy paththeme.ts
72 lines (65 loc) · 1.69 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
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
// src/theme.ts
"use client";
import { createTheme, ThemeOptions } from "@mui/material/styles";
import { Roboto } from "next/font/google";
import { SimplePaletteColorOptions } from "@mui/material/styles/createPalette";
import { PaletteColor, PaletteColorOptions } from "@mui/material";
const roboto = Roboto({
weight: ["300", "400", "500", "700"],
subsets: ["latin"],
display: "swap",
});
declare module "@mui/material/styles" {
interface Palette {
header: PaletteColor;
}
interface PaletteOptions {
header?: PaletteColorOptions;
}
}
const prodThemeOptions: ThemeOptions = {
typography: {
fontFamily: roboto.style.fontFamily,
},
palette: {
primary: {
main: "#000000",
},
secondary: {
main: "#f4f4f4",
},
background: {
default: "#ffffff",
},
header: {
main: "#f4f4f4",
},
},
components: {
MuiButton: {
styleOverrides: {
root: {
textTransform: "none",
},
sizeLarge: {
height: "40px",
paddingLeft: "34px",
paddingRight: "34px",
},
sizeSmall: {
height: "32px",
paddingLeft: "14px",
paddingRight: "14px",
},
},
},
},
};
const devThemeOptions: ThemeOptions = structuredClone(prodThemeOptions);
(devThemeOptions.palette!.header as SimplePaletteColorOptions).main = "#ffc981";
const localThemeOptions: ThemeOptions = structuredClone(devThemeOptions);
(localThemeOptions.palette!.header as SimplePaletteColorOptions).main =
"#d4f9ff";
export const prodTheme = createTheme(prodThemeOptions);
export const devTheme = createTheme(devThemeOptions);
export const localTheme = createTheme(localThemeOptions);