@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
12 lines (11 loc) • 486 B
TypeScript
import React, { HTMLAttributes } from "react";
import { AsChildProps } from "../util/types";
interface PortalBaseProps extends HTMLAttributes<HTMLDivElement> {
/**
* An optional container where the portaled content should be appended.
*/
rootElement?: HTMLElement | null;
}
export type PortalProps = PortalBaseProps & AsChildProps;
export declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
export default Portal;