- move font size and color to theme
- move Gauge specific props back to component
This commit is contained in:
1 parent
fb458b279d
commit
94e4d1b1cb
3 files changed
+28
-11
No files matched your search
@@ -1,6 +1,5 @@
|
||||
import { createTheme } from "@mui/material";
|
||||
import { gaugeHeaderCommon } from "./lightTheme"
|
||||
export { gaugeHeaderCommon }
|
||||
|
||||
const text = {
|
||||
primary: "#fafafa",
|
||||
@@ -31,6 +30,16 @@ const darkTheme = createTheme({
|
||||
body1: { fontSize: 13, color: text.tertiary, fontWeight: 400 },
|
||||
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
|
||||
},
|
||||
chart: {
|
||||
header :{
|
||||
...gaugeHeaderCommon,
|
||||
fontSize: 11,
|
||||
},
|
||||
subheader :{
|
||||
...gaugeHeaderCommon,
|
||||
fontSize: 9
|
||||
}
|
||||
},
|
||||
palette: {
|
||||
mode: "dark",
|
||||
primary: { main: "#1570ef" },
|
||||
|
||||
@@ -15,9 +15,7 @@ const background = {
|
||||
|
||||
export const gaugeHeaderCommon = {
|
||||
fontWeight: 400,
|
||||
fill: text.tertiary,
|
||||
textAnchor: "middle",
|
||||
dominantBaseline: "middle",
|
||||
fill: text.tertiary
|
||||
}
|
||||
|
||||
const border = { light: "#eaecf0", dark: "#d0d5dd" };
|
||||
@@ -36,11 +34,20 @@ const lightTheme = createTheme({
|
||||
body1: { fontSize: 13, color: text.tertiary, fontWeight: 400 },
|
||||
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
|
||||
},
|
||||
chart: {
|
||||
header :{
|
||||
...gaugeHeaderCommon,
|
||||
fontSize: 11,
|
||||
},
|
||||
subheader :{
|
||||
...gaugeHeaderCommon,
|
||||
fontSize: 9
|
||||
}
|
||||
},
|
||||
palette: {
|
||||
primary: { main: "#1570EF" },
|
||||
secondary: { main: "#F4F4F4", dark: "#e3e3e3", contrastText: "#475467" },
|
||||
text: text,
|
||||
gaugeHeaderCommon: gaugeHeaderCommon,
|
||||
background: background,
|
||||
border: border,
|
||||
info: {
|
||||
|
||||
Reference in new issue
Block a user