@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
16 lines (15 loc) • 586 B
TypeScript
import { Ref } from "react";
//#region src/modal/modalManager.d.ts
/** State management for nested modals. */
declare class ModalManager {
modals: any[];
add: (modal: any) => number;
remove: (modal: any) => any[];
isTopModal: (modal: any) => boolean;
}
declare const manager: ModalManager;
/** Refs of new modals will be automatically added/removed from the state when rendering. */
declare function useModalManager(ref: Ref<any>, isOpen?: boolean, disableScrollLock?: boolean): void;
//#endregion
export { manager, useModalManager };
//# sourceMappingURL=modalManager.d.ts.map