Skip to content

Commit

Permalink
fix: dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Vieira Marcelino authored and nathan-vm committed May 13, 2024
1 parent 3d02503 commit b155c97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
26 changes: 3 additions & 23 deletions frontend/src/context/theme/theme.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ export const lightTheme = createTheme({
export const darkTheme = createTheme({
palette: {
mode: "dark",
primary: {
secondary: {
main: "#283D52",
light: "#6088B0",
dark: "#1B2937",
contrastText: "#FFFFFF",
},
secondary: {
primary: {
main: "#00B140",
light: "#00E052",
dark: "#008F34",
Expand Down Expand Up @@ -133,27 +133,7 @@ export const darkTheme = createTheme({
},
},
components: {
MuiCheckbox: {
defaultProps: {
color: "secondary",
},
},
MuiTextField: {
defaultProps: {
color: "secondary",
},
},
MuiSelect: {
defaultProps: {
color: "secondary",
},
styleOverrides: {
root: {
"&.MuiDisabled": "secondary.dark",
},
},
},
MuiInputLabel: {
MuiButton: {
defaultProps: {
color: "secondary",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ const PieceDocsPopover: React.FC<PieceDocsPopoverProps> = ({
paddingBottom: "2rem",
overflow: "hidden",
"& .popover-handle": {
backgroundColor: theme.palette.primary.main,
backgroundColor:
theme.palette.mode === "dark"
? theme.palette.secondary.main
: theme.palette.primary.main,
padding: "0.5rem",
"& .drag-handle": {
cursor: "move",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ const PiecesSidebarNode: FC<{
<HelpIcon
sx={{
height: "20px",
color:
theme.palette.mode === "light"
? theme.palette.primary.main
: theme.palette.secondary.main,
color: theme.palette.primary.main,
}}
/>
</IconButton>
Expand Down

0 comments on commit b155c97

Please sign in to comment.