import React from "react"; import { createPortal } from "react-dom"; import { ArrowLeft } from "lucide-react"; import { Button } from "@/components/ui/button"; interface FullScreenPanelProps { isOpen: boolean; title: string; onClose: () => void; children: React.ReactNode; footer?: React.ReactNode; } /** * Reusable full-screen panel component * Handles portal rendering, header with back button, and footer * Uses solid theme colors without transparency */ export const FullScreenPanel: React.FC = ({ isOpen, title, onClose, children, footer, }) => { React.useEffect(() => { if (isOpen) { document.body.style.overflow = "hidden"; } return () => { document.body.style.overflow = ""; }; }, [isOpen]); if (!isOpen) return null; return createPortal(
{/* Header */}

{title}

{/* Content */}
{children}
{/* Footer */} {footer && (
{footer}
)}
, document.body, ); };