UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

27 lines (26 loc) 822 B
import { PortalProps } from '@ark-ui/react'; import { PropsWithChildren } from 'react'; /** * This module is the Portal component. * @module */ export type { PortalProps }; /** * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component. * @see https://cerberus.digitalu.design/react/portal * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal) * @example * ```tsx * 'use client' * * import { Portal } from '@cerberus/react' * * function SomeFeatureWithinSSRPage() { * return ( * <Portal> * <div>Portal Content outside of the React VDom tree</div> * </Portal> * ) * } */ export declare const Portal: (props: PropsWithChildren<PortalProps>) => import("react/jsx-runtime").JSX.Element;