Skip to content

Profectus / game/layers / setupLayerModal

Function: setupLayerModal() ​

setupLayerModal(layer): object

Utility function for creating a modal that display's a LayerOptions.display. Returns the modal itself, which can be rendered anywhere you need, as well as a function to open the modal.

Parameters ​

layer ​

Layer

The layer to display in the modal.

Returns ​

object

modal: () => JSX.Element

Returns ​

JSX.Element

openModal ​

openModal: VoidFunction

Defined in ​

profectus/src/game/layers.tsx:371