UNPKG

heroui-modal-provider

Version:

[![package version](https://img.shields.io/npm/v/heroui-modal-provider.svg?style=flat-square)](https://www.npmjs.com/package/heroui-modal-provider) [![package downloads](https://img.shields.io/npm/dm/heroui-modal-provider.svg?style=flat-square)](https://w

33 lines 863 B
import { State, StateElement, ActionMap, ModalComponentProps, Props } from './types'; export declare enum Types { SHOW = "SHOW", HIDE = "HIDE", UPDATE = "UPDATE", DESTROY = "DESTROY", DESTROY_BY_ROOT_ID = "DESTROY_BY_ROOT_ID", UNKNOWN = "UNKNOWN" } interface Payload { [Types.SHOW]: StateElement & { id: string; }; [Types.HIDE]: { id: string; }; [Types.UPDATE]: { id: string; props: ModalComponentProps<Props>; }; [Types.DESTROY]: { id: string; }; [Types.DESTROY_BY_ROOT_ID]: { rootId: string; }; [Types.UNKNOWN]: undefined; } type Action = ActionMap<Payload>[keyof ActionMap<Payload>]; export declare const initialState: State; export default function reducer(state: State, action: Action): State; export {}; //# sourceMappingURL=reducer.d.ts.map