F

confirm

Asks a yes-or-no question with a confirm and a cancel button, each text a message key.

function confirm<T extends keyof Messages, B extends keyof Messages = never>(title: T, options: ConfirmOptions<T, B>): Promise<boolean>

Parameters

NameTypeDescription
titleT

The question's message key.

optionsConfirmOptions<T, B>

The body, confirm and cancel keys, titleVars and bodyVars for keys with placeholders, and destructive.

Returns

Promise<boolean>

Whether the user confirmed; cancel, the backdrop, the back gesture or a dismiss resolve false.