import { useTheme } from "@xtablo/shared/contexts/ThemeContext"; import { Button } from "@xtablo/ui/components/button"; import { MonitorIcon, MoonIcon, SunIcon } from "lucide-react"; import type { CSSProperties, MouseEventHandler, ReactNode } from "react"; import { twMerge } from "tailwind-merge"; type AuthCardShellProps = { title: string; description?: ReactNode; children: ReactNode; background?: ReactNode; topLeft?: ReactNode; showThemeToggle?: boolean; onBackdropClick?: () => void; wrapperClassName?: string; wrapperStyle?: CSSProperties; onWrapperMouseMove?: MouseEventHandler; onWrapperMouseLeave?: () => void; isHovered?: boolean; cardClassName?: string; }; const XTABLO_ASSETS_BASE_URL = "https://assets.xtablo.com"; export function AuthCardShell({ title, description, children, background, topLeft, showThemeToggle = false, onBackdropClick, wrapperClassName, wrapperStyle, onWrapperMouseMove, onWrapperMouseLeave, isHovered = false, cardClassName, }: AuthCardShellProps) { const { theme, setTheme } = useTheme(); const toggleTheme = () => { if (theme === "light") { setTheme("dark"); } else if (theme === "dark") { setTheme("system"); } else { setTheme("light"); } }; const themeIcon = theme === "light" ? ( ) : theme === "dark" ? ( ) : ( ); return (
{background}
event.stopPropagation()} >
{topLeft || showThemeToggle ? (
{topLeft}
{showThemeToggle ? ( ) : null}
) : null}
Xtablo Xtablo

{title}

{description ?
{description}
: null}
{children}
); }