import { ReactElement, RefObject } from 'react'; import { WithCloseBehavior } from '../Modal'; import { Styles } from '../../../tasty'; export declare type JengaDialogClose = (close: () => void) => ReactElement; export interface JengaDialogTriggerProps extends WithCloseBehavior { /** The Dialog and its trigger element. See the DialogTrigger [Content section](#content) for more information on what to provide as children. */ children: [ReactElement, JengaDialogClose | ReactElement]; /** * The type of Dialog that should be rendered. See the DialogTrigger [types section](#dialog-types) for an explanation on each. * @default 'modal' */ type?: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover' | 'panel'; /** The type of Dialog that should be rendered when on a mobile device. See DialogTrigger [types section](#dialog-types) for an explanation on each. */ mobileType?: 'modal' | 'tray' | 'fullscreen' | 'fullscreenTakeover' | 'panel'; /** * Whether a popover type Dialog's arrow should be hidden. */ hideArrow?: boolean; /** The ref of the element the Dialog should visually attach itself to. Defaults to the trigger button if not defined. */ targetRef?: RefObject; /** Whether a modal type Dialog should be dismissable. */ isDismissable?: boolean; /** Whether pressing the escape key to close the dialog should be disabled. */ isKeyboardDismissDisabled?: boolean; /** The screen breakpoint for the mobile type */ mobileViewport?: number; /** The style map for the overlay **/ styles?: Styles; shouldCloseOnInteractOutside?: (element: Element) => boolean; } declare function DialogTrigger(props: any): JSX.Element; /** * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's * open state with the trigger's press state. Additionally, it allows you to customize the type and * positioning of the Dialog. */ declare let _DialogTrigger: typeof DialogTrigger; export { _DialogTrigger as DialogTrigger };