Remove most of Radix UI

This commit is contained in:
Gregory Schier
2023-03-20 13:16:58 -07:00
parent b84a5530be
commit e19ea612f5
31 changed files with 549 additions and 2017 deletions

View File

@@ -0,0 +1,12 @@
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);
}