adminFront/src/theme.ts

152 lines
2.8 KiB
TypeScript
Raw Normal View History

2022-09-09 13:54:49 +00:00
import { createTheme, PaletteColorOptions } from "@mui/material";
2022-09-05 14:57:41 +00:00
//import { createTheme } from "./types";
2022-09-02 06:36:26 +00:00
2022-09-05 14:57:41 +00:00
const fontFamily: string = "GilroyRegular";
const fontWeight: string = "600";
2022-09-02 06:36:26 +00:00
const theme = createTheme({
palette: {
primary: {
2022-09-09 13:54:49 +00:00
main: "#111217"
2022-09-02 06:36:26 +00:00
},
2022-09-05 14:57:41 +00:00
secondary: {
main: "#ffffff"
},
2022-09-09 13:54:49 +00:00
menu: {
main: "#2f3339"
},
content: {
main: "#26272c"
},
grayLight: {
2022-09-09 13:54:49 +00:00
main: "#707070"
},
grayDark: {
main: "#45494c"
},
grayMedium: {
main: "#424242"
},
2022-09-12 13:28:56 +00:00
grayDisabled: {
main: "#c0c1c3"
},
2022-09-09 13:54:49 +00:00
golden: {
main: "#eaba5b"
},
goldenDark: {
main: "#fe9903"
},
goldenMedium: {
main: "#2a2b1d"
2022-09-05 14:57:41 +00:00
}
},
typography: {
body1: {
fontFamily: fontFamily
},
subtitle1: {
fontFamily: fontFamily,
fontWeight: fontWeight,
2022-09-06 11:52:36 +00:00
fontSize: 25
2022-09-05 14:57:41 +00:00
},
subtitle2: {
fontFamily: fontFamily,
2022-09-08 17:21:17 +00:00
fontSize: 25,
textAlign: "center"
2022-09-05 14:57:41 +00:00
},
caption: {
fontFamily: fontFamily,
fontWeight: fontWeight,
2022-09-06 11:52:36 +00:00
fontSize: 21
2022-09-05 14:57:41 +00:00
},
h5: {
fontFamily: fontFamily,
fontWeight: fontWeight,
2022-09-06 11:52:36 +00:00
fontSize: 35
2022-09-05 14:57:41 +00:00
},
h6: {
fontFamily: fontFamily,
fontWeight: fontWeight,
2022-09-19 11:45:58 +00:00
fontSize: 18
2022-09-05 14:57:41 +00:00
},
2022-09-06 11:52:36 +00:00
button: {
fontFamily: fontFamily,
fontWeight: fontWeight,
fontSize: 22
},
h4: {
fontFamily: fontFamily,
fontWeight: fontWeight,
fontSize: 16
}
2022-09-02 06:36:26 +00:00
},
});
2022-09-05 14:57:41 +00:00
declare module '@mui/material/styles' {
interface Theme {
palette: {
primary: {
2022-09-09 13:54:49 +00:00
main: string
2022-09-05 14:57:41 +00:00
},
secondary: {
main: string;
2022-09-06 11:52:36 +00:00
},
2022-09-09 13:54:49 +00:00
menu: {
main: string;
},
content: {
2022-09-06 11:52:36 +00:00
main: string;
2022-09-09 13:54:49 +00:00
},
grayLight: {
main: string;
},
grayDark: {
main: string;
},
grayMedium: {
2022-09-09 13:54:49 +00:00
main: string;
},
2022-09-12 13:28:56 +00:00
grayDisabled: {
2022-09-09 13:54:49 +00:00
main: string;
},
golden: {
main: string;
},
goldenDark: {
main: string;
},
goldenMedium: {
main: string;
2022-09-12 13:28:56 +00:00
},
caption: {
main: string;
}
2022-09-05 14:57:41 +00:00
}
}
2022-09-09 13:54:49 +00:00
interface PaletteOptions {
menu?: PaletteColorOptions;
content?: PaletteColorOptions;
grayLight?: PaletteColorOptions;
grayDark?: PaletteColorOptions;
grayMedium?: PaletteColorOptions;
2022-09-12 13:28:56 +00:00
grayDisabled?: PaletteColorOptions;
2022-09-09 13:54:49 +00:00
golden?: PaletteColorOptions;
goldenDark?: PaletteColorOptions;
goldenMedium?: PaletteColorOptions;
2022-09-09 13:54:49 +00:00
}
2022-09-05 14:57:41 +00:00
// allow configuration using `createTheme`
interface TypographyVariants {
body1: React.CSSProperties;
subtitle1: React.CSSProperties;
subtitle2: React.CSSProperties;
caption: React.CSSProperties;
h5: React.CSSProperties;
h6: React.CSSProperties;
2022-09-06 11:52:36 +00:00
button: React.CSSProperties;
2022-09-05 14:57:41 +00:00
}
}
2022-09-02 06:36:26 +00:00
export default theme;