UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

24 lines (23 loc) 869 B
import type { ReactNode, RefObject } from 'react'; import type { ModalContentProps } from './types'; declare global { interface Window { __modalRoot: HTMLElement; } } export type ModalRootProps = { /** * The id used internal in the modal/drawer root element. Defaults to `root`, so the element id will be `dnb-modal-root`. */ id?: string; directDomReturn?: boolean; /** * The content which will appear when triggering the modal/drawer. */ children?: ReactNode | ((props: ModalContentProps) => ReactNode); /** For internal use only */ modalContentCloseRef?: RefObject<((event: Event, options: { triggeredBy?: string; }) => void) | null>; } & ModalContentProps; export default function ModalRoot({ children, directDomReturn, ...props }: ModalRootProps): import("react/jsx-runtime").JSX.Element;