diff options
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/ConfirmModal.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/ConfirmModal.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/anastasis-webui/src/pages/home/ConfirmModal.tsx b/packages/anastasis-webui/src/pages/home/ConfirmModal.tsx index cab70de63..e3561d892 100644 --- a/packages/anastasis-webui/src/pages/home/ConfirmModal.tsx +++ b/packages/anastasis-webui/src/pages/home/ConfirmModal.tsx @@ -1,10 +1,11 @@ import { ComponentChildren, h, VNode } from "preact"; +import { AsyncButton } from "../../components/AsyncButton"; export interface ConfirmModelProps { active?: boolean; description?: string; onCancel?: () => void; - onConfirm?: () => void; + onConfirm?: () => Promise<void>; label?: string; cancelLabel?: string; children?: ComponentChildren; @@ -33,13 +34,13 @@ export function ConfirmModal({ {cancelLabel} </button> <div class="buttons is-right" style={{ width: "100%" }}> - <button + <AsyncButton class={danger ? "button is-danger " : "button is-info "} disabled={disabled} onClick={onConfirm} > {label} - </button> + </AsyncButton> </div> </footer> </div> |