Files
yaak/apps/yaak-client/components/Portal.tsx
2026-03-06 09:23:19 -08:00

14 lines
320 B
TypeScript

import type { ReactNode } from 'react';
import { createPortal } from 'react-dom';
import { usePortal } from '../hooks/usePortal';
interface Props {
children: ReactNode;
name: string;
}
export function Portal({ children, name }: Props) {
const portal = usePortal(name);
return createPortal(children, portal);
}