Skip to content

Commit

Permalink
feat: use resetProps
Browse files Browse the repository at this point in the history
  • Loading branch information
mumiao committed Dec 12, 2020
1 parent 056ef35 commit d6200a9
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/components/dialog/ConfirmDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,13 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
onCancel,
onOk,
close,
zIndex,
afterClose,
visible,
keyboard,
centered,
getContainer,
maskStyle,
okText = 'delete',
okButtonProps,
cancelText = 'cancel',
cancelButtonProps,
bodyStyle,
closable = true,
closeIcon,
className,
okCancel,
width = 520,
Expand All @@ -50,6 +43,7 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
maskClosable = false,
transitionName = 'zoom',
maskTransitionName = 'fade',
...resetProps
} = props;

const confirmDescriperClassName = getBEMElement(
Expand Down Expand Up @@ -82,23 +76,16 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
)]: !!props.centered,
})}
onCancel={() => close({ triggerCancel: true })}
visible={visible}
title=""
transitionName={transitionName}
footer=""
maskTransitionName={maskTransitionName}
mask={mask}
maskClosable={maskClosable}
maskStyle={maskStyle}
style={style}
width={width}
zIndex={zIndex}
afterClose={afterClose}
keyboard={keyboard}
centered={centered}
getContainer={getContainer}
closable={closable}
closeIcon={closeIcon}
{...resetProps}
>
<div className={containerClassName} style={bodyStyle}>
<div className={contentClassName}>
Expand Down

0 comments on commit d6200a9

Please sign in to comment.