decoupled light and dark theme

This commit is contained in:
Alex Holliday committed 2024-11-07 10:34:01 +08:00
1 parent 94e4d1b1cb
commit 19c0632143
2 files changed
+17 -19

No files matched your search

+9 -8
View File
@@ -1,5 +1,4 @@
import { createTheme } from "@mui/material"; import { createTheme } from "@mui/material";
import { gaugeHeaderCommon } from "./lightTheme"
const text = { const text = {
primary: "#fafafa", primary: "#fafafa",
@@ -31,15 +30,17 @@ const darkTheme = createTheme({
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 }, body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
}, },
chart: { chart: {
header :{ header: {
...gaugeHeaderCommon, fontWeight: 400,
fill: text.tertiary,
fontSize: 11, fontSize: 11,
}, },
subheader :{ subheader: {
...gaugeHeaderCommon, fontWeight: 400,
fontSize: 9 fill: text.tertiary,
} fontSize: 9,
}, },
},
palette: { palette: {
mode: "dark", mode: "dark",
primary: { main: "#1570ef" }, primary: { main: "#1570ef" },
+8 -11
View File
@@ -13,11 +13,6 @@ const background = {
accent: "#f9fafb", accent: "#f9fafb",
}; };
export const gaugeHeaderCommon = {
fontWeight: 400,
fill: text.tertiary
}
const border = { light: "#eaecf0", dark: "#d0d5dd" }; const border = { light: "#eaecf0", dark: "#d0d5dd" };
const fontFamilyDefault = const fontFamilyDefault =
@@ -35,14 +30,16 @@ const lightTheme = createTheme({
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 }, body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
}, },
chart: { chart: {
header :{ header: {
...gaugeHeaderCommon, fontWeight: 400,
fill: text.tertiary,
fontSize: 11, fontSize: 11,
}, },
subheader :{ subheader: {
...gaugeHeaderCommon, fontWeight: 400,
fontSize: 9 fill: text.tertiary,
} fontSize: 9,
},
}, },
palette: { palette: {
primary: { main: "#1570EF" }, primary: { main: "#1570EF" },