How to use the @ionic/core.actionSheetController.create function in @ionic/core

To help you get started, we’ve selected a few @ionic/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 jgw96 / web-whiteboard / src / components / app-images / app-images.tsx View on Github external
async uploadToDrive(image, ev) {
    ev.preventDefault();

    const sheet = await actionSheetCtrl.create({
      header: "Share",
      buttons: [
        {
          text: "Upload to OneDrive",
          icon: 'cloud',
          handler: async (): Promise => {
            const imageBlob = b64toBlob(image.url.replace("data:image/png;base64,", ""), 'image/jpg');

            let provider = (window as any).mgt.Providers.globalProvider;
            if (provider) {
              let graphClient = provider.graph.client;
              console.log(graphClient);

              const loading = await loadingController.create({
                message: "Uploading...",
                showBackdrop: navigator.userAgent.includes('iPad') === false && window.matchMedia("(min-width: 1200px)").matches ? false : true
github jgw96 / web-whiteboard / src / components / app-images / app-images.tsx View on Github external
const provider = (window as any).mgt.Providers.globalProvider;
          const user = provider.graph.client.config.middleware.authenticationProvider._userAgentApplication.account;

          await sendCommand(device.id, `https://webboard-app.web.app/boards/${name}/${user.name}/board`);

          const toast = await toastCtrl.create({
            message: `Opened board on ${device.Model || device.Name}`,
            duration: 1800
          });
          await toast.present();
        }
      })
    })

    if (deviceButtons) {
      const sheet = await actionSheetCtrl.create({
        header: 'Share to your devices',
        buttons: deviceButtons
      });
      await sheet.present();
    }
  }