Skip to content

Commit

Permalink
feat: optimize default action
Browse files Browse the repository at this point in the history
  • Loading branch information
mumiao committed Dec 10, 2020
1 parent f97c818 commit 36919df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/components/dialog/ConfirmDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
centered,
getContainer,
maskStyle,
okText = 'Ok',
okText = 'delete',
okButtonProps,
cancelText = 'Cancel',
cancelText = 'cancel',
cancelButtonProps,
bodyStyle,
closable = true,
Expand Down Expand Up @@ -78,7 +78,10 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
prefixCls={confirmClassName}
className={classString}
wrapClassName={classNames({
[getBEMModifier(confirmClassName, 'centered')]: !!props.centered,
[getBEMModifier(
confirmClassName,
'centered'
)]: !!props.centered,
})}
onCancel={() => close({ triggerCancel: true })}
visible={visible}
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialog/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const Modal: React.FC<IModalProps> = (props) => {
centered,
getContainer,
closeIcon,
cancelText = 'Ok',
okText = 'Save',
cancelText = 'cancel',
okText = 'ok',
...restProps
} = props;

Expand Down

0 comments on commit 36919df

Please sign in to comment.