Skip to content

Commit 72e88db

Browse files
committed
fix dark download and save buttons
1 parent bd40461 commit 72e88db

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

client/src/workspace/HeaderButton/index.jsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const ButtonInnerContent = styled("div")(({ theme }) => ({
3333
flexDirection: "column",
3434
}))
3535
const IconContainer = styled("div")(({defaultTheme, theme, textHidden, disabled }) => ({
36-
color: disabled
36+
color: disabled && theme === "light"
3737
? defaultTheme.palette.action.disabled
38-
: theme === "dark"
38+
: theme === "dark" && !disabled
3939
? colors.grey[200]
4040
: colors.grey[700],
4141
height: textHidden ? 32 : 20,
@@ -48,10 +48,10 @@ const IconContainer = styled("div")(({defaultTheme, theme, textHidden, disabled
4848
const Text = styled("div")(({ defaultTheme, theme, disabled }) => ({
4949
fontWeight: "bold",
5050
fontSize: 11,
51-
color: disabled
51+
color: disabled && theme === "light"
5252
? defaultTheme.palette.action.disabled
53-
: theme === "dark"
54-
? colors.grey[200]
53+
: theme === "dark" && !disabled
54+
? colors.grey[300]
5555
: colors.grey[700],
5656
display: "flex",
5757
alignItems: "center",
@@ -70,6 +70,7 @@ export const HeaderButton = ({
7070
const customIconMapping = useIconDictionary()
7171
const isSmallDevice = useMediaQuery(defaultTheme.breakpoints.down("sm"))
7272
const { theme } = useTheme();
73+
console.log(defaultTheme, theme, 'defaultTheme')
7374
return (
7475
<ThemeProvider theme={defaultTheme}>
7576
<StyledButton onClick={onClick} disabled={disabled}>

0 commit comments

Comments
 (0)