UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

20 lines (19 loc) 771 B
import { Factory } from '../../core'; export interface BasePortalProps extends React.ComponentPropsWithoutRef<'div'> { /** Element inside which portal should be created, by default a new div element is created and appended to the `document.body` */ target?: HTMLElement | string; /** If set, all portals are rendered in the same DOM node, `true` by default */ reuseTargetNode?: boolean; } export interface PortalProps extends BasePortalProps { /** Portal children, for example, custom modal or popover */ children: React.ReactNode; } export type PortalFactory = Factory<{ props: PortalProps; ref: HTMLDivElement; }>; export declare const Portal: import("../../core").MantineComponent<{ props: PortalProps; ref: HTMLDivElement; }>;