How to use the @carbon/layout/es.breakpoints.md function in @carbon/layout

To help you get started, we’ve selected a few @carbon/layout 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 carbon-design-system / carbon-website-archive / packages / addons-website / src / components / HomepageVideo / HomepageVideo.js View on Github external
onResize = () => {
    const { loop } = this.state;

    if (window.matchMedia(`(max-width: ${breakpoints.md.width})`).matches) {
      if (loop) {
        this.setState({
          loop: false,
        });
      }
    } else {
      if (!loop) {
        this.setState({
          loop: true,
        });
      }
    }
  };