MessageDialogResult
The result of a message dialog.
import { MessageDialogResult } from '@mobrowser/api';
Example
import { app, MessageDialogResult } from '@mobrowser/api';
const result: MessageDialogResult = await app.showMessageDialog({
title: 'Confirm',
message: 'Do you want to continue?',
buttons: [
{ label: 'Cancel', type: 'secondary' },
{ label: 'OK', type: 'primary' }
]
})
if (result.button.type === 'primary') {
console.log('User clicked OK')
}
Properties
button
readonly button: MessageDialogButton;
The button that was clicked.
checkboxChecked
readonly checkboxChecked?: boolean;
The checkbox state if the dialog had a checkbox.
textFieldValues
readonly textFieldValues: string[];
The values of the text fields or an empty array if the dialog had no text fields.