@moderntribe/wme
Version:
Components and hooks to build the best UX/UI admin wizards
28 lines (27 loc) • 851 B
TypeScript
/**
* We use useQueryParam to handle if the modal should be open or not.
* We can have only one wizard modal open at a time.
* Pass Wizard name to useWizardModal as a string
*/
/// <reference types="react" />
export declare const QUERY_PARAM_NAME = "wizard";
export declare function useWizardModal(wizardName: string): {
currentWizard: string | null | undefined;
forceClose: () => void;
open?: undefined;
close?: undefined;
isVisible?: undefined;
modalProps?: undefined;
} | {
currentWizard: string | null | undefined;
open: () => void;
close: () => void;
isVisible: boolean;
forceClose: () => void;
modalProps: {
open: boolean;
onClose: () => void;
closeWarning: boolean;
setCloseWarning: import("react").Dispatch<import("react").SetStateAction<boolean>>;
};
};