feat: theme for dark mode (#982)

Co-authored-by: QiShaoXuan <qishaoxuan777@gmail.com>
This commit is contained in:
x1a0t
2023-02-16 14:23:24 +08:00
committed by GitHub
parent 520076b31d
commit fe8831f7ae
5 changed files with 37 additions and 26 deletions
+13 -8
View File
@@ -3,14 +3,19 @@ import ModalUnstyled from '@mui/base/ModalUnstyled';
import { Wrapper } from '../layout';
import { CSSProperties } from 'react';
export const StyledBackdrop = styled.div({
zIndex: '-1',
position: 'fixed',
right: '0',
bottom: '0',
top: '0',
left: '0',
backgroundColor: 'rgba(58, 76, 92, 0.2)',
export const StyledBackdrop = styled.div(({ theme }) => {
return {
zIndex: '-1',
position: 'fixed',
right: '0',
bottom: '0',
top: '0',
left: '0',
backgroundColor:
theme.mode === 'light'
? 'rgba(58, 76, 92, 0.2)'
: 'rgba(34, 34, 34, 0.6)',
};
});
export const StyledModal = styled(ModalUnstyled, {