UNPKG

wix-style-react

Version:
84 lines 4.81 kB
export default Modal; declare class Modal extends React.PureComponent<any, any, any> { static propTypes: { /** Applied as data-hook HTML attribute that can be used to create driver in testing */ dataHook: PropTypes.Requireable<string>; /** Controls if modal is open or closed */ isOpen: PropTypes.Validator<boolean>; /** Border radius of modal */ borderRadius: PropTypes.Requireable<number>; /** a11y: The value of contentLabel is set as an aria-label on the modal element. This helps assistive technology, like screen readers, to add a label to an element that would otherwise be anonymous */ contentLabel: PropTypes.Requireable<string>; /** Renders modal content */ children: PropTypes.Requireable<any>; /** Controls z-index of the modal overlay */ zIndex: PropTypes.Requireable<number>; /** Enables to close modal when mouse clicked on overlay area */ shouldCloseOnOverlayClick: PropTypes.Requireable<boolean>; /** Displays a close button on the top right corner of the overlay */ shouldDisplayCloseButton: PropTypes.Requireable<boolean>; /** Callback that will be executed when the modal is requested to be closed, prior to actually closing */ onRequestClose: PropTypes.Requireable<(...args: any[]) => any>; /** Callback that will be executed after the modal has been opened */ onAfterOpen: PropTypes.Requireable<(...args: any[]) => any>; /** Callback that will be executed after the modal has been closed */ onAfterClose: PropTypes.Requireable<(...args: any[]) => any>; /** Horizontal position of the modal */ horizontalPosition: PropTypes.Requireable<string>; /** Vertical position of the modal */ verticalPosition: PropTypes.Requireable<string>; /** Number indicating the milliseconds to wait before closing the modal */ closeTimeoutMS: PropTypes.Requireable<number>; /** Specifies if modal portal supports scroll */ scrollable: PropTypes.Requireable<boolean>; /** Specifies if modal content should become scrollable when modal size will fit the window */ scrollableContent: PropTypes.Requireable<boolean>; /** Sets the maximum height for a scrollable content */ maxHeight: PropTypes.Requireable<string>; /** Sets the height for modal's content container */ height: PropTypes.Requireable<string>; /** css position of the modal overlay */ overlayPosition: PropTypes.Requireable<string>; /** A function that returns a DOM element on which the modal should be appended to */ parentSelector: PropTypes.Requireable<(...args: any[]) => any>; /** Selector specifying where to apply the aria-hidden attribute */ appElement: PropTypes.Requireable<string>; /** Specifies minimum spacing between full viewport and modal content */ screen: PropTypes.Requireable<string>; /** Enable navigation previous buttons to the side of the content and listen on clicks by using onNavigationClickPrevious */ showNavigationPreviousButton: PropTypes.Requireable<boolean>; /** Enable navigation next button to the side of the content and listen on clicks by using onNavigationClickNext */ showNavigationNextButton: PropTypes.Requireable<boolean>; /** Callback that will be executed when the navigation control previous is clicked */ onNavigationClickPrevious: PropTypes.Requireable<(...args: any[]) => any>; /** Callback that will be executed when the navigation control next is clicked */ onNavigationClickNext: PropTypes.Requireable<(...args: any[]) => any>; /** Label used for navigation control previous button tooltip */ navigationPreviousLabel: PropTypes.Requireable<string>; /** Label used for navigation control next button tooltip */ navigationNextLabel: PropTypes.Requireable<string>; }; static defaultProps: { borderRadius: number; shouldCloseOnOverlayClick: boolean; shouldDisplayCloseButton: boolean; horizontalPosition: string; verticalPosition: string; closeTimeoutMS: number; scrollable: boolean; scrollableContent: boolean; height: string; maxHeight: string; overlayPosition: string; screen: string; }; constructor(props: any); CHILDREN_WRAPPER_DIV_ID: string; handleOverlayClick: (event: any) => void; renderCloseButton: () => React.JSX.Element; renderNavigationControls: () => React.JSX.Element; render(): React.JSX.Element; } import React from 'react'; import PropTypes from 'prop-types'; //# sourceMappingURL=Modal.d.ts.map