import { AriaAttributes, ReactNode, default as React } from 'react'; import { OverlayProps } from '../..'; import { ModalContentProps } from './ModalContent'; export type ModalChildrenProps = { fade: 'in' | 'out'; fadeOut: () => void; fadeIn: () => void; }; type ModalChildrenFunction = (props: ModalChildrenProps) => ReactNode; export interface ModalProps extends Omit { /** * ID to find this component in testing tools (e.g.: cypress, testing library, and jest). */ testId?: string; /** * Identifies the element (or elements) that labels the current element. * @see aria-labelledby https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby */ 'aria-labelledby'?: AriaAttributes['aria-label']; /** * A boolean value that represents the state of the Modal. */ isOpen?: boolean; /** * Event emitted when the modal is closed. */ onDismiss?: () => void; /** * Callback function when the modal is opened. */ onEntered?: () => void; /** * Props forwarded to the `Overlay` component. */ overlayProps?: OverlayProps; /** * Children or function as a children. */ children: ModalChildrenFunction | ReactNode; /** * Disable being closed using the Escape key. */ disableEscapeKeyDown?: boolean; } declare const Modal: ({ children, testId, isOpen, onDismiss, overlayProps, disableEscapeKeyDown, onEntered, ...otherProps }: ModalProps) => React.ReactPortal | null; export default Modal; //# sourceMappingURL=Modal.d.ts.map