@expofp/floorplan
Version:
Interactive floor plan library for expos and events
2 lines (1 loc) • 640 B
JavaScript
import{jsx as r}from"react/jsx-runtime";import{MobileToggleButton as t}from"@expofp/ui";import{useObserver as s}from"mobx-react-lite";import{useCallback as a}from"react";import{searchStore as n,uiState as e}from"../store";import{t as o}from"../utils/i18n";function m(){const l=a(()=>{e.isOverlayOpen&&e.overlaySize==="full"?e.desiredOverlaySize="small":n.openOverlayWithoutInputFocus()},[]);return s(()=>{if(!e.shouldShowMobileToggle)return null;const i=e.mobileToggleIsListMode;return r(t,{mode:i?"list":"map",label:i?o("List"):o("Map"),ariaLabel:i?o("Show list"):o("Show map"),withBanner:e.isBannerVisible,onClick:l})})}export default m;