Improve logic to show dialog outside of components

This commit is contained in:
schroda
2025-10-03 22:34:46 +02:00
parent 60f11a2832
commit 9329ef5fdc
12 changed files with 192 additions and 65 deletions

View File

@@ -85,7 +85,13 @@ export const ConfirmDialog = ({
}}
>
{actions.extra.show && (
<Button onClick={onExtra} variant={actions.extra.contain ? 'contained' : undefined}>
<Button
onClick={() => {
onCancel();
onExtra?.();
}}
variant={actions.extra.contain ? 'contained' : undefined}
>
{actions.extra.title}
</Button>
)}