import { type PropsWithChildren, type ReactNode, type JSX } from 'react'; import { type ModalBaseProps } from './ModalBase'; interface BaseProps { className?: string; contentClassName?: string; closeOnEscape?: boolean; closeOnBackdropClick?: boolean; trapFocus?: boolean; /** See ModalBase. Pass a negative number when the content focuses itself. */ initialFocus?: ModalBaseProps['initialFocus']; isOpen?: boolean; onDismiss?: () => void; /** If not set will call onDismiss if that is set. */ onClickBackdrop?: () => void; } interface WithStringTitleProps extends BaseProps { /** Title for the modal or custom header element */ title: string; ariaLabel?: never; } interface WithCustomTitleProps extends BaseProps { /** Title for the modal or custom header element */ title: JSX.Element; /** aria-label for the dialog. only needed when passing a custom title element */ ariaLabel: string; } export type Props = WithStringTitleProps | WithCustomTitleProps; /** * https://developers.grafana.com/ui/latest/index.html?path=/docs/overlays-modal--docs */ export declare function Modal(props: PropsWithChildren): JSX.Element; export declare namespace Modal { export { ModalButtonRow as ButtonRow }; } declare function ModalButtonRow({ leftItems, children }: { leftItems?: ReactNode; children: ReactNode; }): JSX.Element; export {};