createModalStack

createModalStack() is the function that's going to turn your configuration into a usable modal stack.

const createModalStack = (
  config: ModalStackConfig,
  customDefaultOptions?: ModalOptions
) => ModalStack

Argument: ModalStackConfig config - Modal stack configuration.

Argument: ModalOptions customDefaultOptions - Configuration options to apply to all modals by default (optional).

Returns: Modal stack configuration object to provide to <ModalProvider/>'s stack prop.

Example:

Last updated

Was this helpful?