react-hook-popup
Version:
Easily manage popups like alerts and modals in React with a single hook
10 lines (9 loc) • 403 B
TypeScript
/// <reference types="react" />
interface IPopupContext {
registerPopup: (key: string, popupRenderer: PopupRenderer, confirmResolver: (value: boolean) => void) => void;
unRegisterPopup: (key: string) => void;
displayPopup: (key: string, message?: string) => void;
closePopup: (key: string) => void;
}
export declare const PopupContext: import("react").Context<IPopupContext>;
export {};