UNPKG

@grafana/ui

Version:
37 lines (36 loc) 1.29 kB
import { type PropsWithChildren, type ReactNode, type JSX } from 'react'; interface BaseProps { className?: string; contentClassName?: string; closeOnEscape?: boolean; closeOnBackdropClick?: boolean; trapFocus?: boolean; 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<Props>): import("react/jsx-runtime").JSX.Element; export declare namespace Modal { var ButtonRow: typeof ModalButtonRow; } declare function ModalButtonRow({ leftItems, children }: { leftItems?: ReactNode; children: ReactNode; }): import("react/jsx-runtime").JSX.Element; export {};