import { cn } from '@/lib/utils'; import { X } from 'lucide-react'; import { createPortal } from 'react-dom'; import type { ReactNode } from 'react'; interface ModalProps { open: boolean; onClose: () => void; title: string; children: ReactNode; className?: string; } export function Modal({ open, onClose, title, children, className }: ModalProps) { if (!open) return null; return createPortal(