Contents

MessageDialogTextField

A text field in a message dialog.

Example 

import { app } from '@mobrowser/api';

const win = app.createWindow()
app.showMessageDialog({
  parentWindow: win,
  title: 'Confirm',
  message: 'Do you want to continue?',
  textFields: [
    { placeholder: 'Enter your name', value: 'John Doe' }
  ],
  buttons: [
    { label: 'Cancel', type: 'secondary' },
    { label: 'OK', type: 'primary' }
  ]
})

Properties 

placeholder 

readonly placeholder: string;

The placeholder of the text field.

value 

readonly value?: string;

The initial value of the text field.

type 

readonly type?: MessageDialogTextFieldType;

The type of the text field. Default: ’text'