Added darkmode warning palette

This commit is contained in:
Daniel Cojocea committed 2024-08-30 12:53:23 -04:00
1 parent 15defa33eb
commit d56ee2abb7
4 files changed
+32 -54

No files matched your search

+4 -33
View File
@@ -200,31 +200,12 @@ const BasicTable = ({ data, paginated, reversed, table }) => {
return (
<>
<TableContainer
component={Paper}
sx={{
backgroundColor: theme.palette.background.main,
border: `solid 1px ${theme.palette.border.light}`,
borderRadius: theme.shape.borderRadius,
}}
>
<TableContainer component={Paper}>
<Table>
<TableHead
sx={{
backgroundColor: theme.palette.background.accent,
}}
>
<TableHead>
<TableRow>
{data.cols.map((col) => (
<TableCell
key={col.id}
sx={{
color: theme.palette.text.secondary,
borderBottomColor: theme.palette.border.light,
}}
>
{col.name}
</TableCell>
<TableCell key={col.id}>{col.name}</TableCell>
))}
</TableRow>
</TableHead>
@@ -242,17 +223,7 @@ const BasicTable = ({ data, paginated, reversed, table }) => {
onClick={row.handleClick ? row.handleClick : null}
>
{row.data.map((cell) => {
return (
<TableCell
key={cell.id}
sx={{
color: theme.palette.text.secondary,
borderBottomColor: theme.palette.border.light,
}}
>
{cell.data}
</TableCell>
);
return <TableCell key={cell.id}>{cell.data}</TableCell>;
})}
</TableRow>
);
+18 -3
View File
@@ -598,8 +598,9 @@ function Sidebar() {
MenuListProps={{
sx: {
p: 2,
"& li": { m: 0 },
"& li:has(.MuiBox-root):hover": {
backgroundColor: theme.palette.background.main,
backgroundColor: "transparent",
},
},
}}
@@ -620,8 +621,22 @@ function Sidebar() {
</MenuItem>
)}
{collapsed && <Divider />}
<MenuItem onClick={() => dispatch(setMode("light"))}>Light</MenuItem>
<MenuItem onClick={() => dispatch(setMode("dark"))}>Dark</MenuItem>
<MenuItem
onClick={() => {
dispatch(setMode("light"));
closePopup();
}}
>
Light
</MenuItem>
<MenuItem
onClick={() => {
dispatch(setMode("dark"));
closePopup();
}}
>
Dark
</MenuItem>
<Divider />
<MenuItem
onClick={logout}