Portal
The Portal component renders its children in a new DOM tree outside the current component.
import { Portal } from '@fintech-sandpit/ui/react';
const container = useRef<HTMLElement>(document.body);
return ( <Portal container={container}> <div> Portal content </div> </Portal>);| Name | Type | Default | Description |
|---|---|---|---|
disabled | boolean | false | Whether to disable the portal |
container | RefObject<HTMLElement> | Document body | The container to render the portal in |