decoupled light and dark theme

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

View File

@@ -1,5 +1,4 @@
import { createTheme } from "@mui/material";
import { gaugeHeaderCommon } from "./lightTheme"
const text = {
primary: "#fafafa",
@@ -31,15 +30,17 @@ const darkTheme = createTheme({
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
},
chart: {
header :{
...gaugeHeaderCommon,
header: {
fontWeight: 400,
fill: text.tertiary,
fontSize: 11,
},
subheader :{
...gaugeHeaderCommon,
fontSize: 9
}
},
subheader: {
fontWeight: 400,
fill: text.tertiary,
fontSize: 9,
},
},
palette: {
mode: "dark",
primary: { main: "#1570ef" },

View File

@@ -13,11 +13,6 @@ const background = {
accent: "#f9fafb",
};
export const gaugeHeaderCommon = {
fontWeight: 400,
fill: text.tertiary
}
const border = { light: "#eaecf0", dark: "#d0d5dd" };
const fontFamilyDefault =
@@ -35,14 +30,16 @@ const lightTheme = createTheme({
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
},
chart: {
header :{
...gaugeHeaderCommon,
header: {
fontWeight: 400,
fill: text.tertiary,
fontSize: 11,
},
subheader :{
...gaugeHeaderCommon,
fontSize: 9
}
subheader: {
fontWeight: 400,
fill: text.tertiary,
fontSize: 9,
},
},
palette: {
primary: { main: "#1570EF" },