From 8dbe361c868054aba4069c1823c458eae6c5b2df Mon Sep 17 00:00:00 2001 From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com> Date: Wed, 15 Jun 2022 14:12:21 +0200 Subject: [PATCH] feat: add handle to AlertDialog --- packages/status-react/src/system/dialog/alert-dialog.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/status-react/src/system/dialog/alert-dialog.tsx b/packages/status-react/src/system/dialog/alert-dialog.tsx index 62b8485f..4a43404c 100644 --- a/packages/status-react/src/system/dialog/alert-dialog.tsx +++ b/packages/status-react/src/system/dialog/alert-dialog.tsx @@ -40,6 +40,7 @@ interface DialogProps { description: string actionLabel: string actionVariant?: ButtonProps['variant'] + onAction: VoidFunction cancelLabel?: string onOpenAutoFocus?: DialogContentProps['onOpenAutoFocus'] onCloseAutoFocus?: DialogContentProps['onCloseAutoFocus'] @@ -51,6 +52,7 @@ const AlertDialog = (props: DialogProps) => { description, actionLabel, actionVariant, + onAction, cancelLabel = 'Cancel', ...contentProps } = props @@ -77,7 +79,9 @@ const AlertDialog = (props: DialogProps) => { - +