wix-style-react
Version:
wix-style-react
69 lines • 3.09 kB
TypeScript
export default ModalPreviewLayout;
/** This is a fullscreen modal to present a document to the user overlaying the entire view port */
declare class ModalPreviewLayout extends React.PureComponent<any, any, any> {
static displayName: string;
static propTypes: {
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook: PropTypes.Requireable<string>;
/** component to be displayed in header strip to preform actions relevant to the displayed content */
actions: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** title text to be displayed in the header strip */
title: PropTypes.Requireable<string>;
/** modal content displayed mid-screen*/
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
/** callback for when the modal is closed */
onClose: PropTypes.Validator<(...args: any[]) => any>;
/** boolean to determine whether closing the overlay on click */
shouldCloseOnOverlayClick: PropTypes.Requireable<boolean>;
/** Tooltip close button text */
closeButtonTooltipText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Previous button props
* ##### onClick signature:
* function(childIndexDisplayed: number) => void
* * `childIndexDisplayed`: the index of the child component displayed.
*/
prevButtonProps: PropTypes.Requireable<PropTypes.InferProps<{
onClick: PropTypes.Requireable<(...args: any[]) => any>;
tooltipText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
}>>;
/** Next button props
* ##### onClick signature:
* function(childIndexDisplayed: number) => void
* * `childIndexDisplayed`: the index of the child component displayed.
*/
nextButtonProps: PropTypes.Requireable<PropTypes.InferProps<{
onClick: PropTypes.Requireable<(...args: any[]) => any>;
tooltipText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
}>>;
/**
* Pass an index to start rendering from a specific child component.
*/
startDisplayingAtChildIndex: PropTypes.Requireable<number>;
/** Controls the skin of the component */
skin: PropTypes.Requireable<string>;
};
static defaultProps: {
shouldCloseOnOverlayClick: boolean;
nextButtonProps: {};
prevButtonProps: {};
startDisplayingAtChildIndex: number;
skin: string;
};
constructor(props: any);
state: {
childIndexDisplayed: any;
};
_shouldClose(id: any): any;
_onRightNavigationClick: () => void;
_onLeftNavigationClick: () => void;
_onOverlayClick(onClose: any): ({ target: { id } }: {
target: {
id: any;
};
}) => void;
_renderNavigationButtons(hasLeft: any, hasRight: any): React.JSX.Element;
render(): React.JSX.Element;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=ModalPreviewLayout.d.ts.map