Skip to content

Commit d6200a9

Browse files
committed
feat: use resetProps
1 parent 056ef35 commit d6200a9

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/components/dialog/ConfirmDialog.tsx

+2-15
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,13 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
2828
onCancel,
2929
onOk,
3030
close,
31-
zIndex,
32-
afterClose,
33-
visible,
34-
keyboard,
35-
centered,
36-
getContainer,
3731
maskStyle,
3832
okText = 'delete',
3933
okButtonProps,
4034
cancelText = 'cancel',
4135
cancelButtonProps,
4236
bodyStyle,
4337
closable = true,
44-
closeIcon,
4538
className,
4639
okCancel,
4740
width = 520,
@@ -50,6 +43,7 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
5043
maskClosable = false,
5144
transitionName = 'zoom',
5245
maskTransitionName = 'fade',
46+
...resetProps
5347
} = props;
5448

5549
const confirmDescriperClassName = getBEMElement(
@@ -82,23 +76,16 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
8276
)]: !!props.centered,
8377
})}
8478
onCancel={() => close({ triggerCancel: true })}
85-
visible={visible}
8679
title=""
8780
transitionName={transitionName}
8881
footer=""
8982
maskTransitionName={maskTransitionName}
9083
mask={mask}
9184
maskClosable={maskClosable}
92-
maskStyle={maskStyle}
9385
style={style}
9486
width={width}
95-
zIndex={zIndex}
96-
afterClose={afterClose}
97-
keyboard={keyboard}
98-
centered={centered}
99-
getContainer={getContainer}
10087
closable={closable}
101-
closeIcon={closeIcon}
88+
{...resetProps}
10289
>
10390
<div className={containerClassName} style={bodyStyle}>
10491
<div className={contentClassName}>

0 commit comments

Comments
 (0)