UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

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