Refactored sx styling to theme file style overrides

This commit is contained in:
Daniel Cojocea committed 2024-08-29 20:42:12 -04:00
1 parent bddca58a37
commit 4352b3690d
12 files changed
+90 -101

No files matched your search

+30
View File
@@ -5,6 +5,7 @@ const text = {
secondary: "#e6e6e6",
tertiary: "#a1a1aa",
accent: "#e6e6e6",
disabled: "rgba(172, 172, 172, 0.3)",
};
const background = {
main: "#151518",
@@ -54,10 +55,13 @@ const darkTheme = createTheme({
border: "#fec84b",
},
unresolved: { main: "#4e5ba6", light: "#e2eaf7", bg: "#f2f4f7" },
divider: border.light,
other: {
icon: "#e6e6e6",
line: "#27272a",
fill: "#18181a",
},
// TO BE REMOVED //
primary: {
main: "#1570ef",
},
@@ -67,6 +71,7 @@ const darkTheme = createTheme({
tertiary: {
main: "#e6e6e6",
},
// ----------------- //
},
spacing: 2,
components: {
@@ -79,6 +84,7 @@ const darkTheme = createTheme({
styleOverrides: {
root: {
marginTop: 4,
padding: 0,
border: 1,
borderStyle: "solid",
borderColor: border.light,
@@ -88,6 +94,30 @@ const darkTheme = createTheme({
},
},
},
MuiList: {
styleOverrides: {
root: {
padding: 0,
},
},
},
MuiMenuItem: {
styleOverrides: {
root: {
borderRadius: 4,
backgroundColor: "inherit",
padding: "4px 6px",
color: text.secondary,
fontSize: 13,
margin: 2,
minWidth: 100,
"&:hover, &.Mui-selected, &.Mui-selected:hover, &.Mui-selected.Mui-focusVisible":
{
backgroundColor: background.fill,
},
},
},
},
MuiTableCell: {
styleOverrides: {
root: {
+30
View File
@@ -22,6 +22,7 @@ const shadow =
const lightTheme = createTheme({
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
palette: {
mode: "dark",
common: { main: "#1570ef" },
text: text,
background: background,
@@ -54,10 +55,13 @@ const lightTheme = createTheme({
border: "#fec84b",
},
unresolved: { main: "#4e5ba6", light: "#e2eaf7", bg: "#f2f4f7" },
divider: border.light,
other: {
icon: "#667085",
line: "#d6d9dd",
fill: "#e3e3e3",
},
// TO BE REMOVED //
primary: {
main: "#1570EF",
},
@@ -67,6 +71,7 @@ const lightTheme = createTheme({
tertiary: {
main: "#475467",
},
// ----------------- //
},
spacing: 2,
components: {
@@ -88,6 +93,31 @@ const lightTheme = createTheme({
},
},
},
MuiList: {
styleOverrides: {
root: {
padding: 0,
},
},
},
MuiMenuItem: {
styleOverrides: {
root: {
borderRadius: 4,
backgroundColor: "inherit",
padding: "4px 6px",
color: text.secondary,
fontSize: 13,
margin: 2,
marginBottom: 0,
minWidth: 100,
"&:hover, &.Mui-selected, &.Mui-selected:hover, &.Mui-selected.Mui-focusVisible":
{
backgroundColor: background.fill,
},
},
},
},
MuiTableCell: {
styleOverrides: {
root: {