"use client"; import { createPortal } from "react-dom"; import ModalHeader from "../../utility/ModalHeader"; import type { LoginViewProps } from "./Login.types"; export function LoginView({ isOpen, onClose, children, belowCard, className, ariaLabel, ariaLabelledBy, dialogRef, backdropRef, portalReady, usePortal, }: LoginViewProps) { if (!isOpen) return null; if (usePortal && !portalReady) return null; const content = (
e.stopPropagation()} >
{children}
{belowCard ? (
e.stopPropagation()}> {belowCard}
) : null}
); if (usePortal) { return createPortal(content, document.body); } return content; }