// Adapted from Kibo UI (MIT), with owned React/CSS APIs. See THIRD_PARTY_NOTICES.md. "use client"; import { useRef, type ComponentProps } from "react"; export type ImageZoomProps = Omit, "children"> & { src: string; alt: string; zoomSrc?: string; }; export function ImageZoom({ src, alt, zoomSrc, className = "", ...props }: ImageZoomProps) { const dialog = useRef(null); const trigger = useRef(null); return (
trigger.current?.focus()} aria-label={alt} onClick={(event) => { if (event.target === event.currentTarget) event.currentTarget.close(); }} > {alt}
); }