UNPKG

781 BTypeScriptView Raw
1export interface ManagedModalProps {
2 disableScrollLock?: boolean;
3}
4export declare function ariaHidden(element: Element, show: boolean): void;
5interface Modal {
6 mount: Element;
7 modalRef: Element;
8}
9/**
10 * @ignore - do not document.
11 *
12 * Proper state management for containers and the modals in those containers.
13 * Simplified, but inspired by react-overlay's ModalManager class.
14 * Used by the Modal to ensure proper styling of containers.
15 */
16export default class ModalManager {
17 private containers;
18 private modals;
19 constructor();
20 add(modal: Modal, container: HTMLElement): number;
21 mount(modal: Modal, props: ManagedModalProps): void;
22 remove(modal: Modal, ariaHiddenState?: boolean): number;
23 isTopModal(modal: Modal): boolean;
24}
25export {};