Confirm
This function displays a confirm with the specified properties and waits for the confirm to be closed before resolving the promise.
Confirm
Are you sure you want to proceed with this action?
WARNING
This feature requires a parent Root component to function correctly, as it is responsible for rendering the confirm.
Required icons
circle-check
Functional API
Confirms can only be shown from code. An Overlay should be used if you want to show a confirm from within your template.
⌛️ Waiting for confirmation...
ts
const result = await showConfirm({
icon: 'circle-exclamation',
title: 'Title',
message: 'Are you sure?'
});
ts
declare function showConfirm(spec: FluxConfirmObject): Promise<void>;
ts
type FluxConfirmObject = {
readonly id: number;
readonly icon?: FluxIconName;
readonly message: string;
readonly title: string;
onCancel(): void;
onConfirm(): void;
};