/** * Modal * * Provides a modal functionality without any opinions about what it should look * like. * * TODO: (check if these are still valid) * - Visual aspects * - Open/close animations ? * - Prevent "click-outside" and "esc" to close all stacked dialogs ? * - In "with-knobs"-story only one sub-modal can be opened at a time?! */ import { HTMLAttributes, FC, ReactNode } from 'react'; declare type BaseElement = HTMLDivElement; declare type BaseProps = HTMLAttributes; export interface ModalBackdropProps extends BaseProps { readonly children?: ReactNode; /** * `class` to be passed to the component. */ readonly className?: BaseProps['className']; } export declare const ModalBackdrop: FC; export interface ModalProps extends BaseProps { readonly children?: ReactNode; /** * `class` to be passed to the component. */ readonly className?: BaseProps['className']; /** * Handler which is called when the modal should be closed (e.g. when the user * pressed the escape key). You need to set open to `false` to close the modal, * or do nothing to leave the modal open. */ readonly onClose?: VoidFunction; /** * If `true`, centers the modal. */ readonly verticallyCenter?: boolean; /** * If `true`, puts the modal dialog into focus. */ readonly focusDialog?: boolean; /** * When `true` the dialog is rendered, `false` removes the dialog. */ readonly open: boolean; /** * If `true`, clicking outside the modal is possible, `false` does not allow * clicking outside the modal. */ readonly allowOutsideClick?: boolean; } export declare const Modal: FC; export {};