How to use the @deckdeckgo/utils.DeckDeckGoUtils.isMobile function in @deckdeckgo/utils

To help you get started, we’ve selected a few @deckdeckgo/utils 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 deckgo / deckdeckgo / webcomponents / core / src / components / slides / deckdeckgo-slide-code / deckdeckgo-slide-code.tsx View on Github external
return new Promise((resolve) => {
      // Only on mobile devices
      if (DeckDeckGoUtils.isMobile()) {
        const info: HTMLElement = this.el.querySelector('[slot=\'info\']');

        if (info && info.classList.contains('deckgo-show-info')) {
          info.classList.remove('deckgo-show-info');
          info.style.setProperty('pointer-events', 'none');

          resolve(true);
          return;
        }
      }

      resolve(false);
    });
  }