How to use @mapbox/mr-ui - 4 common examples

To help you get started, we’ve selected a few @mapbox/mr-ui 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 mapbox / dr-ui / src / components / search / search-modal.js View on Github external
componentWillUnmount() {
    if (typeof window === 'undefined') return;
    getWindow().clearTimeout(this.scrollTimeout);
  }
github mapbox / dr-ui / src / components / search / search-modal.js View on Github external
componentDidMount() {
    if (!this.dialogEl || typeof window === 'undefined') return;
    this.scrollTimeout = getWindow().setTimeout(() => {
      const offsetParent = this.dialogEl.offsetParent;
      if (offsetParent.tagName === 'BODY' || offsetParent.tagName === 'HTML') {
        return;
      }
      offsetParent.scrollTop = 0;
    }, 0);
  }
github mapbox / dr-ui / demo / src / components / application-wrapper.js View on Github external
addRouteChangeEndListener(() => {
  pageLoadingIndicator.end();
});
github mapbox / dr-ui / demo / src / components / application-wrapper.js View on Github external
addRouteChangeStartListener(() => {
  pageLoadingIndicator.start();
});
addRouteChangeEndListener(() => {

@mapbox/mr-ui

UI components for Mapbox projects

BSD-2-Clause
Latest version published 25 days ago

Package Health Score

73 / 100
Full package analysis