Refactored theme common color props and fixed button background delay on theme change

This commit is contained in:
Daniel Cojocea committed 2024-08-31 01:33:33 -04:00
1 parent 313a3af67c
commit ac48378614
18 files changed
+48 -40

No files matched your search

+9 -5
View File
@@ -14,7 +14,6 @@ const background = {
accent: "#18181a",
};
const border = { light: "#27272a", dark: "#2c2c2c" };
const common = { main: "#1570ef", dark: "#0e4ea7", contrastText: "#FFFFFF" };
const fontFamilyDefault =
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
@@ -25,7 +24,7 @@ const darkTheme = createTheme({
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
palette: {
mode: "dark",
common: common,
primary: { main: "#1570ef" },
text: text,
background: background,
border: border,
@@ -66,9 +65,6 @@ const darkTheme = createTheme({
grid: "#454546",
},
// TO BE REMOVED //
primary: {
main: "#1570ef",
},
secondary: {
main: "#e6e6e6",
},
@@ -103,6 +99,7 @@ const darkTheme = createTheme({
styleOverrides: {
root: {
padding: 4,
transition: "none",
"&:hover": {
backgroundColor: background.fill,
},
@@ -131,6 +128,13 @@ const darkTheme = createTheme({
},
},
},
MuiListItemButton: {
styleOverrides: {
root: {
transition: "none",
},
},
},
MuiMenuItem: {
styleOverrides: {
root: {
+9 -5
View File
@@ -13,7 +13,6 @@ const background = {
accent: "#f9fafb",
};
const border = { light: "#eaecf0", dark: "#d0d5dd" };
const common = { main: "#1570ef", dark: "#0e4ea7", contrastText: "#FFFFFF" };
const fontFamilyDefault =
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
@@ -23,7 +22,7 @@ const shadow =
const lightTheme = createTheme({
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
palette: {
common: common,
primary: { main: "#1570EF" },
text: text,
background: background,
border: border,
@@ -63,9 +62,6 @@ const lightTheme = createTheme({
grid: "#a2a3a3",
},
// TO BE REMOVED //
primary: {
main: "#1570EF",
},
secondary: {
main: "#475467",
},
@@ -100,6 +96,7 @@ const lightTheme = createTheme({
styleOverrides: {
root: {
padding: 4,
transition: "none",
"&:hover": {
backgroundColor: background.fill,
},
@@ -126,6 +123,13 @@ const lightTheme = createTheme({
},
},
},
MuiListItemButton: {
styleOverrides: {
root: {
transition: "none",
},
},
},
MuiMenuItem: {
styleOverrides: {
root: {