Skip to content

Commit

Permalink
fix background of download list in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jul 28, 2024
1 parent 72e88db commit 9e1112a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client/src/workspace/DownloadButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { hexToRgbTuple } from "../../utils/color-utils.js"
import HeaderButton from "../HeaderButton/index.jsx"
import { useTranslation } from "react-i18next"
import config from "../../config.js"
import { useTheme } from '../../ThemeContext'

const DownloadButton = ({
selectedImageName,
Expand Down Expand Up @@ -97,7 +98,7 @@ const DownloadButton = ({
showSnackbar(t("error.downloading_file"), "error")
})
}

const { theme } = useTheme();
return (
<>
<HeaderButton
Expand All @@ -114,6 +115,8 @@ const DownloadButton = ({
anchorEl={anchorEl}
open={Boolean(anchorEl)}
onClose={handleClose}
sx={{ mt: "1px", "& .MuiMenu-paper": theme === "dark" ? { backgroundColor: "#333", color: "#fff" } : {},
}}
>
<MenuItem
onClick={() => handleDownload("configuration")}
Expand Down
1 change: 0 additions & 1 deletion client/src/workspace/HeaderButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const HeaderButton = ({
const customIconMapping = useIconDictionary()
const isSmallDevice = useMediaQuery(defaultTheme.breakpoints.down("sm"))
const { theme } = useTheme();
console.log(defaultTheme, theme, 'defaultTheme')
return (
<ThemeProvider theme={defaultTheme}>
<StyledButton onClick={onClick} disabled={disabled}>
Expand Down

0 comments on commit 9e1112a

Please sign in to comment.