Skip to content

Commit

Permalink
fix(blocks-antd): Fix confirm modal button icons, closes #1160
Browse files Browse the repository at this point in the history
  • Loading branch information
Gervwyk committed Apr 7, 2022
1 parent ec8d5ca commit bba35be
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const button = (path) => ({
},
properties: {
size: 'small',
title: 'button:',
title: `${path}:`,
inner: true,
},
blocks: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,32 @@ const ConfirmModal = ({ blockId, events, content, components: { Icon }, methods,
className: methods.makeCssClass(properties.modalStyle),
closable: properties.closable,
okText: properties.okText || 'Ok',
okButtonProps: properties.okButton,
cancelButtonProps: properties.cancelButton,
okButtonProps:
properties.okButton && properties.okButton.icon
? {
...properties.okButton,
icon: properties.okButton.icon && (
<Icon
blockId={`${blockId}_ok_icon`}
events={events}
properties={properties.okButton.icon}
/>
),
}
: properties.okButton,
cancelButtonProps:
properties.cancelButton && properties.cancelButton.icon
? {
...properties.cancelButton,
icon: properties.cancelButton.icon && (
<Icon
blockId={`${blockId}_ok_icon`}
events={events}
properties={properties.cancelButton.icon}
/>
),
}
: properties.cancelButton,
cancelText: properties.cancelText || 'Cancel',
centered: properties.centered || false,
mask: properties.mask !== undefined ? properties.mask : true,
Expand Down

0 comments on commit bba35be

Please sign in to comment.