UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

14 lines (13 loc) 659 B
import React from "react"; export interface ModalContextProps { /** Set that a specific modal is currently being open (or closed) */ setModalOpen: (modalId: string, isOpen: boolean) => void; /** The currently opened modals ordered by when they have been opened. Oldest coming first. */ openModalStack(): string[] | undefined; } /** Can be provided in the application to react to modal related changes. */ export declare const ModalContext: React.Context<ModalContextProps>; /** Default implementation for modal context props. * Tracks open modals in a stack representation. **/ export declare const useModalContext: () => ModalContextProps;