Skip to content

Commit

Permalink
fix: color changes on text in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cfuisat committed Aug 21, 2024
1 parent 592b49e commit 2a476fa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import betaExplorer from "/assets/beta-explorer.png";
import poolTool from "/assets/pool-tool.png";
import LinkIcon from "@mui/icons-material/Link";

import { useTheme, ThemeProvider } from "@mui/material/styles";
import { ThemeProvider } from "@mui/material";
import { lightTheme, darkTheme } from "src/common/style/theme";

const useQuery = () => {
Expand Down Expand Up @@ -207,7 +207,7 @@ const CardanoExplorer = () => {
</Grid>
)}
<Grid item xs={12}>
<Typography variant="h6" gutterBottom>
<Typography variant="h6" color={theme.palette.text.primary} gutterBottom>
Select the Explorer of your choice
</Typography>
</Grid>
Expand Down
5 changes: 4 additions & 1 deletion src/common/style/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const commonTypography = {
lineHeight: '24px',
letterSpacing: '-0.5px',
textAlign: 'left',
margin: '6% 0'
margin: '6% 0',
color: 'inherit',
}
};

Expand All @@ -38,6 +39,7 @@ export const lightTheme = createTheme({
},
text: {
primary: '#000000',
secondary: '#ffffff'
},
},
typography: {
Expand All @@ -55,6 +57,7 @@ export const darkTheme = createTheme({
},
text: {
primary: '#ffffff',
secondary: '#000000'
},
},
typography: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function Header({ toggleTheme, isDarkMode }) {
color: "#fff",
}}
>
<Typography variant="h1" gutterBottom>
<Typography variant="h1" color={theme.palette.text.secondary} gutterBottom>
Explorers
</Typography>
<Typography variant="subtitle1" gutterBottom>
<Typography variant="subtitle1" color={theme.palette.text.secondary} gutterBottom>
List of Cardano Explorers from our Community and Foundation.
</Typography>
</Box>
Expand Down

0 comments on commit 2a476fa

Please sign in to comment.