isCompactViewport
Whether a viewport is a phone's, in either orientation: narrower than
PANEL_MIN_WIDTH (the bottom sheet) or shorter than
PANEL_MAX_HEIGHT_EXCLUSIVE (a phone on its side, which gets the side
panel). A short desktop window counts too. The map key starts minimised
here, because the screen is small.
This is a function exported by @mapcairn/core, checked against version 0.2.0.
Signature
import { isCompactViewport } from "@mapcairn/core";
function isCompactViewport(viewport: {
width: number;
height: number;
}): boolean;
Parameters
viewport({ width: number; height: number; })
Returns
boolean