// src/components/AuthModal.tsx import React from 'react'; import { X } from 'lucide-react'; interface AuthModalProps { isOpen: boolean; onClose: () => void; children: React.ReactNode; } const AuthModal: React.FC = ({ isOpen, onClose, children }) => { if (!isOpen) return null; return ( // Backdrop/Overlay: Fixed position, full screen, dark, and translucent
{/* Modal Content Container: Prevent closing when clicking on the form itself */}
e.stopPropagation()} > {/* Close Button */} {/* Children (SignIn or SignUp content) */}
{children}
); }; export default AuthModal;