|
|
@ -23,12 +23,14 @@ const ConfirmDialog = forwardRef< |
|
|
|
{ |
|
|
|
{ |
|
|
|
actionCancelText = 'Cancel', |
|
|
|
actionCancelText = 'Cancel', |
|
|
|
actionProceedText, |
|
|
|
actionProceedText, |
|
|
|
|
|
|
|
closeOnProceed = false, |
|
|
|
content, |
|
|
|
content, |
|
|
|
dialogProps: { |
|
|
|
dialogProps: { |
|
|
|
open: baseOpen = false, |
|
|
|
open: baseOpen = false, |
|
|
|
PaperProps: paperProps = {}, |
|
|
|
PaperProps: paperProps = {}, |
|
|
|
...restDialogProps |
|
|
|
...restDialogProps |
|
|
|
} = {}, |
|
|
|
} = {}, |
|
|
|
|
|
|
|
onActionAppend, |
|
|
|
onCancelAppend, |
|
|
|
onCancelAppend, |
|
|
|
onProceedAppend, |
|
|
|
onProceedAppend, |
|
|
|
openInitially = false, |
|
|
|
openInitially = false, |
|
|
@ -95,6 +97,7 @@ const ConfirmDialog = forwardRef< |
|
|
|
onClick={(...args) => { |
|
|
|
onClick={(...args) => { |
|
|
|
setIsOpen(false); |
|
|
|
setIsOpen(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onActionAppend?.call(null, ...args); |
|
|
|
onCancelAppend?.call(null, ...args); |
|
|
|
onCancelAppend?.call(null, ...args); |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
@ -102,8 +105,11 @@ const ConfirmDialog = forwardRef< |
|
|
|
</ContainedButton> |
|
|
|
</ContainedButton> |
|
|
|
<ContainedButton |
|
|
|
<ContainedButton |
|
|
|
onClick={(...args) => { |
|
|
|
onClick={(...args) => { |
|
|
|
|
|
|
|
if (closeOnProceed) { |
|
|
|
setIsOpen(false); |
|
|
|
setIsOpen(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onActionAppend?.call(null, ...args); |
|
|
|
onProceedAppend?.call(null, ...args); |
|
|
|
onProceedAppend?.call(null, ...args); |
|
|
|
}} |
|
|
|
}} |
|
|
|
{...restProceedButtonProps} |
|
|
|
{...restProceedButtonProps} |
|
|
|