Skip to content

Commit eb9f605

Browse files
authored
fix: donation modal text dark mode (#920)
1 parent 03f9823 commit eb9f605

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/layout/ThemeContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const ThemeProvider: FC<PropsWithChildren> = ({ children }) => {
4848
algorithm: isDarkTheme ? darkAlgorithm : defaultAlgorithm,
4949
token: {
5050
colorBgBase: isDarkTheme ? '#1c1d1c' : '#ffffff',
51+
colorTextBase: isDarkTheme ? '#ffffff' : '#000000',
5152
},
5253
}}>
5354
<MuiThemeProvider theme={isDarkTheme ? darkTheme : lightTheme}>

src/layout/header/DonationButton.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export const DonationButton = () => {
3737
<Modal
3838
open={open}
3939
onClose={onClose}
40+
sx={{
41+
color: 'text.primary', // Dynamically uses the theme’s text color
42+
}}
4043
aria-labelledby="modal-modal-title"
4144
aria-describedby="modal-modal-description">
4245
<Box dir={i18n.dir()} sx={style}>

src/pages/DonateModal/DonateModal.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ const DonateModal: React.FC<DonateModalProps> = ({ isVisible, onClose }) => {
2424
<Modal
2525
open={isVisible}
2626
onClose={onClose}
27-
style={{ color: '#1498e5' }}
2827
aria-labelledby="modal-modal-title"
29-
aria-describedby="modal-modal-description">
28+
aria-describedby="modal-modal-description"
29+
sx={{
30+
color: 'text.primary', // Dynamically uses the theme’s text color
31+
}}>
3032
<Box dir={i18n.dir()} sx={style}>
3133
<button onClick={onClose} className="close-modal-icon">
3234
X

0 commit comments

Comments
 (0)