SheetContentProps
Props for SheetContent.
This is an interface exported by @mapcairn/map, checked against version 0.2.0.
Signature
import type { SheetContentProps } from "@mapcairn/map";
interface SheetContentProps
Properties
about
readonly about?: HelpAbout;
The host's About block for Help. Without it Help has none. Its link address must be a trusted http or https one that the host supplies.
basemapId
readonly basemapId: string;
The chosen basemap id.
draw
readonly draw?: UseDraw;
The drawing, from useDraw. Without it there is no Shapes section.
hasPin
readonly hasPin: boolean;
Whether a pin is on the map.
imageCredits
readonly imageCredits?: string;
The credits drawn into a saved map image (see creditsLine).
intro
readonly intro?: string;
The line above the layers, in place of "Open data from public providers", for a host whose layers are not that.
layers
readonly layers?: DataLayers;
The data layers, from useDataLayers. Without it, or for a host whose
catalogue was ready with no layers at mount, there is no Layers section;
a catalogue that loads shows its state there (loading, failed, empty).
onBasemapChange
readonly onBasemapChange: (id: string) => void;
Called with the basemap id the user chose.
onDropPin
readonly onDropPin: () => void;
Drops a pin at the centre of the map.
onShowOnMap
readonly onShowOnMap?: () => void;
Called after "Show on map" in the Layers section, so the host can make room for the map.
onStartTour
readonly onStartTour?: () => void;
Starts the first-visit tour from Help. Without it Help offers no tour.
pinCard
readonly pinCard?: ReactNode;
The pin's details, shown inside the Pin section.
privacyHref
readonly privacyHref?: string;
Where the privacy policy is. Defaults to /privacy.
privacyNote
readonly privacyNote?: ReactNode;
The host's privacy statement for Settings, shown in place of the default.
section
readonly section?: SheetSection;
The section to bring into view, which also picks what the sheet holds:
Settings and Help for settings and help, and Basemap, Pin, Layers,
Shapes and Save image for any other section or none. When it changes, the
section scrolls to the top of the sheet and its heading takes focus.
Choosing the same section again while this component stays mounted does
nothing, so the caller should unmount the content when the sheet closes.
showTurnOffAll
readonly showTurnOffAll?: boolean;
Whether the Layers section offers "Turn off all layers" and the Undo after it. Defaults to true.
See also
Source: packages/map/src/panels/SheetContent/SheetContent.tsx:19