How to use the @capacitor/core.Plugins.Modals function in @capacitor/core

To help you get started, we’ve selected a few @capacitor/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ionic-team / capacitor / example / src / pages / modals / modals.ts View on Github external
async showActions() {
    let promptRet = await Plugins.Modals.showActions({
      title: 'Photo Options',
      message: 'Select an option to perform',
      options: [
        {
          title: 'Upload'
        },
        {
          title: 'Share'
        },
        {
          title: 'Remove',
          style: ActionSheetOptionStyle.Destructive
        }
      ]
    })
    console.log('You selected', promptRet);
github ionic-team / capacitor / example / src / pages / photos / photos.ts View on Github external
async createAlbum() {
    var name = await Plugins.Modals.prompt({
      title: 'Album Name',
      message: ''
    });
    let ret = await Plugins.Photos.createAlbum({
      name: name.value
    });
    console.log('Album created');
  }
github ionic-team / capacitor / example / src / pages / accessibility / accessibility.ts View on Github external
async speak() {
    var value = await Plugins.Modals.prompt({
      title: "Value to speak",
      message: "Enter the value to speak"
    });

    Plugins.Accessibility.speak({
      value: value.value
    });
  }
}