// ============================================================================= // Lightbox Component - Full-screen image viewer // ============================================================================= import type { MouseEvent } from "react"; export interface LightboxProps { src: string; alt: string; onClose: () => void; } export function Lightbox({ src, alt, onClose }: LightboxProps) { function handleOverlayClick(e: MouseEvent) { e.stopPropagation(); if (e.target === e.currentTarget) { onClose(); } } return (
{ if (e.key === "Escape") { e.stopPropagation(); onClose(); } }} >
{alt} e.stopPropagation()} onKeyDown={(e) => e.stopPropagation()} />
); }