UNPKG

react-elegant-ui

Version:

Elegant UI components, made by BEM best practices for react

44 lines (43 loc) 1.32 kB
import { FC, RefObject } from 'react'; import { IComponentHTMLElement } from '../../types/IComponent'; import { OnClose } from '../LayerManager/LayerManager'; import './Modal.css'; export declare const cnModal: import("@bem-react/classname").ClassNameFormatter; export interface IModalProps extends IComponentHTMLElement<HTMLDivElement> { visible?: boolean; /** * Ref on DOM element to render popup there * * This element should have `position: relative` * * If your block have `overflow hidden`, use external container to render popup to prevent clipping */ scope?: RefObject<HTMLElement>; /** * Don't unmount non-visible component */ keepMounted?: boolean; /** * Don't render a backdrop */ hideBackdrop?: boolean; contentVerticalAlign?: 'top' | 'middle' | 'bottom'; /** * Handler of close by esc key or click outside of popup */ onClose?: OnClose; /** * Array of Refs to DOM nodes who should not handle interactions to close * * @internal */ essentialRefs?: RefObject<HTMLElement>[]; /** * DOM node that should not handle interactions to close * * @internal */ hostRef?: RefObject<HTMLElement>; zIndex?: number; } export declare const Modal: FC<IModalProps>;