diff --git a/components/modal/ConfirmDialog.tsx b/components/modal/ConfirmDialog.tsx index 2a698fe4f4..54c0e9686a 100644 --- a/components/modal/ConfirmDialog.tsx +++ b/components/modal/ConfirmDialog.tsx @@ -106,9 +106,7 @@ export function ConfirmContent( )}
{props.content}
- {footer !== undefined ? ( - footer - ) : ( + {footer === undefined ? (
{cancelButton}
+ ) : ( + footer )} ); diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx index 20f5864704..10d6239ff4 100644 --- a/components/modal/Modal.tsx +++ b/components/modal/Modal.tsx @@ -182,6 +182,7 @@ const Modal: React.FC = (props) => { visible, width = 520, + footer, ...restProps } = props; @@ -210,11 +211,7 @@ const Modal: React.FC = (props) => { rootClassName={classNames(hashId, rootClassName)} wrapClassName={wrapClassNameExtended} footer={ - props.footer === null ? ( - props.footer - ) : ( -