"use client"; import { createPortal } from "react-dom"; import ModalHeader from "../../utility/ModalHeader"; import type { LoginBackdropVariant, LoginViewProps } from "./Login.types"; const backdropClasses: Record = { solid: "bg-[var(--color-surface-inverse-brand-primary)]", blurredYellow: "bg-[var(--color-surface-inverse-brand-primary)]/85 backdrop-blur-md supports-[backdrop-filter]:bg-[var(--color-surface-inverse-brand-primary)]/75", }; export function LoginView({ isOpen, onClose, children, belowCard, className, ariaLabel, ariaLabelledBy, dialogRef, backdropRef, portalReady, usePortal, backdropVariant, }: 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; }