From 9aa62d42c23cf9178fa2a46e93f58a36224d6675 Mon Sep 17 00:00:00 2001 From: zombiej Date: Sat, 27 Oct 2018 18:54:52 +0800 Subject: [PATCH] Modal.xxx support maskStyle fix #12688 --- components/modal/Modal.tsx | 1 + components/modal/confirm.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 6c65a943b7..45d4b41553 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -79,6 +79,7 @@ export interface ModalFuncProps { zIndex?: number; okCancel?: boolean; style?: React.CSSProperties; + maskStyle?: React.CSSProperties; type?: string; keyboard?: boolean; getContainer?: (instance: React.ReactInstance) => HTMLElement; diff --git a/components/modal/confirm.tsx b/components/modal/confirm.tsx index 8fab01262b..7b5196cd1f 100644 --- a/components/modal/confirm.tsx +++ b/components/modal/confirm.tsx @@ -15,7 +15,7 @@ interface ConfirmDialogProps extends ModalFuncProps { const IS_REACT_16 = !!ReactDOM.createPortal; const ConfirmDialog = (props: ConfirmDialogProps) => { - const { onCancel, onOk, close, zIndex, afterClose, visible, keyboard, centered, getContainer, okButtonProps, cancelButtonProps } = props; + const { onCancel, onOk, close, zIndex, afterClose, visible, keyboard, centered, getContainer, maskStyle, okButtonProps, cancelButtonProps } = props; const iconType = props.iconType || 'question-circle'; const okType = props.okType || 'primary'; const prefixCls = props.prefixCls || 'ant-modal'; @@ -56,6 +56,7 @@ const ConfirmDialog = (props: ConfirmDialogProps) => { footer="" maskTransitionName="fade" maskClosable={maskClosable} + maskStyle={maskStyle} style={style} width={width} zIndex={zIndex}