How to use the @shopgate/pwa-core/emitters/ui.emit function in @shopgate/pwa-core

To help you get started, we’ve selected a few @shopgate/pwa-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 shopgate / pwa / libraries / ui-shared / ProgressBar / index.jsx View on Github external
static show = (pattern) => {
    UIEvents.emit(ProgressBar.PROGRESS_BAR_SHOW, pattern);
  }
github shopgate / pwa / libraries / ui-shared / Sheet / index.jsx View on Github external
handleDidClose = () => {
    UIEvents.emit(SHEET_EVENTS.CLOSE);
  };
github shopgate / pwa / libraries / common / components / ModalContainer / index.jsx View on Github external
useEffect(() => {
    if (modal && !ref.current) {
      ref.current = true;
      UIEvents.emit(MODAL_EVENTS.SHOW);
    }
    if (!modal && ref.current) {
      ref.current = false;
      UIEvents.emit(MODAL_EVENTS.HIDE);
    }
  }, [modal]);
github shopgate / pwa / libraries / ui-shared / ProgressBar / index.jsx View on Github external
static hide = (pattern) => {
    UIEvents.emit(ProgressBar.PROGRESS_BAR_HIDE, pattern);
  }
github shopgate / pwa / libraries / common / components / ModalContainer / index.jsx View on Github external
useEffect(() => {
    if (modal && !ref.current) {
      ref.current = true;
      UIEvents.emit(MODAL_EVENTS.SHOW);
    }
    if (!modal && ref.current) {
      ref.current = false;
      UIEvents.emit(MODAL_EVENTS.HIDE);
    }
  }, [modal]);
github shopgate / pwa / libraries / ui-shared / Sheet / index.jsx View on Github external
handleDidOpen = () => {
    UIEvents.emit(SHEET_EVENTS.OPEN);
    this.props.onDidOpen();
  };