These docs are for v0.1.0. Click to read the latest docs for v1.0.0.

Front.confirm(options, callback)

Display a modal dialog with an optional message and two buttons, OK and Cancel.

The callback will receive a confirmed boolean, indicating whether the user clicked OK or Cancel.

options: object

Field NameTypeDescription
titleStringTitle of the alert.
messageStringBody of the alert.
okTitle (optional)StringLabel of the OK button.
cancelTitle (optional)StringLabel of the cancel button

callback: function

A callback function.

Front.confirm({
    title: 'Title of the confirm dialog',
    message: 'Body of the dialog.',
    okTitle: 'Label of the OK button (optional)',
    cancelTitle: 'Label of the cancel button (optional)'
}, function (confirmed) {
    console.log('User confirmed?', confirmed);
});