import { X } from 'lucide-react'; import { Dialog, DialogPortal, DialogOverlay } from '@/components/ui/dialog'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { VFSImage } from '@/components/VFSImage'; import { cn } from '@/lib/utils'; interface ImageLightboxProps { imageUrl: string | null; onClose: () => void; } export function ImageLightbox({ imageUrl, onClose }: ImageLightboxProps) { return ( !open && onClose()}> {imageUrl && ( <> {/* Clickable background to close */}
{/* Close button */} {/* Image */}
e.stopPropagation()} > {imageUrl.startsWith('/') ? ( ) : ( Expanded image )}
)}
); }