import * as React from 'react'; import { ValuesOf } from '../utils/typeUtils'; import { ARROWS_DIRECTION, SKINS } from './ModalPreviewLayout.constants'; export type ModalPreviewLayoutSkin = ValuesOf; export type ModalPreviewLayoutArrowDirection = ValuesOf; export type ModalPreviewLayoutProps = { /** Applied as data-hook HTML attribute that can be used in the tests. */ dataHook?: string; /** Accepts any content to render in the header strip, such as actions relevant to the displayed content. */ actions?: React.ReactNode; /** Sets the title text displayed in the header strip. Long titles are truncated with an ellipsis. */ title?: string; /** Accepts the content to display in the middle of the screen. When multiple children are passed, one is shown at a time with previous and next buttons to navigate between them. */ children: React.ReactNode; /** Defines a callback function which is called when the close button is clicked, or when the overlay is clicked and `shouldCloseOnOverlayClick` is `true`. */ onClose: () => void; /** Specifies whether clicking the overlay calls `onClose`. * @default true */ shouldCloseOnOverlayClick?: boolean; /** Tooltip close button text. */ closeButtonTooltipText?: string; /** ARIA label for close button. */ closeButtonAriaLabel?: string; /** Previous button props * ##### onClick signature: * function(childIndexDisplayed: number) => void * * `childIndexDisplayed`: the index of the child component displayed. */ prevButtonProps?: PrevButtonProps; /** Next button props * ##### onClick signature: * function(childIndexDisplayed: number) => void * * `childIndexDisplayed`: the index of the child component displayed. */ nextButtonProps?: NextButtonProps; /** Controls the skin of the component. * @default 'dark' */ skin?: ModalPreviewLayoutSkin; /** * Pass an index to start rendering from a specific child component. * @default 0 */ startDisplayingAtChildIndex?: number; }; export type PrevButtonProps = { /** Defines a callback function which is called after the previous button is clicked. Receives the index of the child now displayed. */ onClick?: (childIndexDisplayed: number) => void; /** Sets the tooltip content shown when hovering the previous button. No tooltip is shown when it's empty. */ tooltipText?: React.ReactNode; }; export type NextButtonProps = { /** Defines a callback function which is called after the next button is clicked. Receives the index of the child now displayed. */ onClick?: (childIndexDisplayed: number) => void; /** Sets the tooltip content shown when hovering the next button. No tooltip is shown when it's empty. */ tooltipText?: React.ReactNode; }; //# sourceMappingURL=ModalPreviewLayout.types.d.ts.map