Skip to content

Commit 1e938dd

Browse files
authored
fix(Modal): fix modal hide-mask style
close #203
1 parent 8fc948c commit 1e938dd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/Modal/Modal.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class Modal extends Component {
6565
animation: 'fade',
6666
size: 'md',
6767
zIndex: 1010,
68-
closable: true
68+
closable: true,
69+
mask: true
6970
};
7071
getDefaultFooter = () => {
7172
const { onOk, onClose, locale } = this.props;

src/components/Modal/style/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class RcDialogWrap extends Component {
4141
}
4242

4343
export const ModalWrap = styled(RcDialogWrap)(
44-
({ theme: { designTokens: DT, fontSize } }) => css`
44+
({ theme: { designTokens: DT, fontSize }, mask }) => css`
4545
position: fixed;
4646
overflow: auto;
4747
top: 0;
@@ -51,7 +51,7 @@ export const ModalWrap = styled(RcDialogWrap)(
5151
z-index: 1010;
5252
-webkit-overflow-scrolling: touch;
5353
outline: 0;
54-
background: ${DT.T_MODAL_COLOR_LAYER_DEFAULT};
54+
background: ${mask && DT.T_MODAL_COLOR_LAYER_DEFAULT};
5555
5656
.${prefixCls} {
5757
padding: 0;

0 commit comments

Comments
 (0)