UNPKG

pouncejs

Version:

A collection of UI components from Panther labs

32 lines (31 loc) 1.19 kB
import React from 'react'; export interface ModalProps { /** Whether the modal should be visible or not */ open: boolean; /** Callback fired when the component requests to be closed */ onClose: () => void; /** The title to add to the modal */ title?: string | React.ReactElement; /** Whether to render a close button or not */ showCloseButton?: boolean; /** The id of the HTML node that contains the text of the modal */ 'aria-describedby'?: string; /** Callback fired when user hits "Escape" or clicks outside the dialog. * * When _strictly necessary_, this can be used to prevent a user from closing * the dialog, but otherwise it is important to allow users to close dialogs * for accessibility reasons. */ onDismiss?: (event?: React.SyntheticEvent) => void; /** * The z-index to be applied to the modal overlay * @default 1000 */ overlayZIndex?: number; } /** * A dialog variation that helps with grabbing the user's attention by blurring the background and * presenting an element that requires action from the user */ declare const Modal: React.FC<ModalProps>; export default Modal;