Skip to content

Commit

Permalink
fix: Use a lighter color for dialogs
Browse files Browse the repository at this point in the history
- Remove unnecessary MuiPaper override
- Add MuiDialog override to specify paper color
- Specify lighter paper color for dialog, to distinguish it from lists popup
- Add dialogPaper entry in Palette
  • Loading branch information
COSMO-EMI authored and csm-thu committed Oct 14, 2021
1 parent 9649f52 commit a691e8b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/theme/custom/cosmoDark/palette.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default {
paper: themeColors.background,
secondary: themeColors.backgroundVariant,
card: themeColors.surface,
dialogPaper: themeColors.surface,
signInPage: themeColors.backgroundSignInPage,
signInButton: themeColors.backgroundSignInButton
}
Expand Down
10 changes: 10 additions & 0 deletions src/theme/overrides/MuiDialog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) Cosmo Tech.
// Licensed under the MIT license.

import { palette } from '../custom';

export default {
paper: {
backgroundColor: palette.background.dialogPaper
}
};
13 changes: 0 additions & 13 deletions src/theme/overrides/MuiPaper.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/theme/overrides/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import MuiButton from './MuiButton';
import MuiCard from './MuiCard';
import MuiDialog from './MuiDialog';
import MuiIconButton from './MuiIconButton';
import MuiPaper from './MuiPaper';
import MuiTableCell from './MuiTableCell';
import MuiTableHead from './MuiTableHead';
import MuiTypography from './MuiTypography';
Expand All @@ -13,13 +13,13 @@ import MuiTypography from './MuiTypography';
export default {
MuiButton,
MuiCard,
MuiDialog,
MuiCardHeader: {
title: {
fontSize: '14px'
}
},
MuiIconButton,
MuiPaper,
MuiTableCell,
MuiTableHead,
MuiTypography
Expand Down

0 comments on commit a691e8b

Please sign in to comment.