How to use the current-device.landscape function in current-device

To help you get started, we’ve selected a few current-device 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 cncf / landscapeapp / src / components / ItemDialogContent.js View on Github external
<div> productScrollEl = x }&gt;
              { !scrollAllContent &amp;&amp; productInfo }
              { scrollAllContent &amp;&amp; <div>
                  {productLogoAndTags}
                  <div>{productInfo}</div>
                  {charts}
                </div>
              }

              { showTwitter &amp;&amp; itemInfo.twitter &amp;&amp; }
            </div>
            { !scrollAllContent &amp;&amp; isGoogle &amp;&amp; productLogoAndTags }
        
  );
}
const wrapper = withState('isLandscape', 'setIsLandscape', currentDevice.landscape());
export default wrapper(pure(ItemDialogContent));
github cncf / landscapeapp / src / components / ItemDialogContent.js View on Github external
timeoutId = setInterval(function() {
      setIsLandscape(currentDevice.landscape());
    }, 1000);
  }

current-device

The easiest way to write conditional CSS and/or JavaScript based on device operating system (iOS, Android, Blackberry, Windows, Firefox OS, MeeGo, AppleTV, etc), orientation (Portrait vs. Landscape), and type (Tablet vs. Mobile).

MIT
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis

Similar packages