react-hook-popup
Version:
Easily manage popups like alerts and modals in React with a single hook
6 lines (5 loc) • 611 B
TypeScript
export declare function addPopup(popups: Record<string, Popup>, key: string, renderer: PopupRenderer, confirmResolver: (value: boolean) => void): Record<string, Popup>;
export declare function removePopup(popups: Record<string, Popup>, key: string): Record<string, Popup>;
export declare function setPopupOpen(popups: Record<string, Popup>, key: string): Record<string, Popup>;
export declare function setPopupClosed(popups: Record<string, Popup>, key: string): Record<string, Popup>;
export declare function setPopupMessage(popups: Record<string, Popup>, key: string, message?: string): Record<string, Popup>;