Type Alias: MapContentItems
MapContentItems =
Conditional<AnyHotspot>[]
Defined in: packages/core/src/passages/interactiveMap/types.ts:961
Array returned by a MapContentFn.
Accepts false, null and undefined entries, which are removed before
the map is rendered. That makes conditional hotspots expressible inline
instead of through a callback that returns undefined.
Example
const hotspots: MapContentItems = [
{ type: 'label', content: 'Home', position: { x: 50, y: 50 }, action: goHome },
player.hasKey && {
type: 'label',
content: 'Secret Room',
position: { x: 80, y: 30 },
action: goSecret
}
];