UNPKG

832 BTypeScriptView Raw
1import * as React from "react";
2export interface PortalContextOptions {
3 /** Additional CSS classes to add to all `Portal` elements in this React context. */
4 portalClassName?: string;
5 /** The HTML element that all `Portal` elements in this React context will be added as children to */
6 portalContainer?: HTMLElement;
7}
8/**
9 * A React context to set options for all portals in a given subtree.
10 * Do not use this PortalContext directly, instead use PortalProvider to set the options.
11 */
12export declare const PortalContext: React.Context<PortalContextOptions>;
13/**
14 * Portal context provider.
15 *
16 * @see https://blueprintjs.com/docs/#core/context/portal-provider
17 */
18export declare const PortalProvider: ({ children, portalClassName, portalContainer, }: React.PropsWithChildren<PortalContextOptions>) => JSX.Element;