Scandit.Ui.Alert

Methods

(static) show(options: object)

Shows an alert

Parameters:
Name Type Description
options object
Properties
Name Type Attributes Default Description
title string
text string
buttons object[] <optional>
[{label: "NO", callback: null}, {label: "YES", callback: null}]

Array of buttons which will be displayed on the alert

Examples
  • JavaScript
  • ES6
Scandit.Ui.Alert.show({
  title: 'Title',
  text: 'This is the text of the alert',
  buttons: [
    {
      label: 'OK',
      callback: function() {
        console.log('OK was tapped!');
      }
    },
    {
      label: 'Cancel',
      callback: null
    }
  ]
});
Scandit.Ui.Alert.show({
  title: 'Title',
  text: 'This is the text of the alert',
  buttons: [
    {
      label: 'OK',
      callback: () => {
        console.log('OK was tapped!');
      }
    },
    {
      label: 'Cancel',
      callback: null
    }
  ]
});