import React from "react"; import { useTranslation } from "react-i18next"; import { RemoveButton } from "#/components/shared/buttons/remove-button"; import { I18nKey } from "#/i18n/declaration"; import { ImageLightbox } from "./image-lightbox"; import { Thumbnail } from "./thumbnail"; interface ImagePreviewProps { src: string; onRemove?: () => void; size?: "small" | "large"; } export function ImagePreview({ src, onRemove, size = "small", }: ImagePreviewProps) { const { t } = useTranslation("openhands"); const [isExpanded, setIsExpanded] = React.useState(false); return (
{onRemove && ( )} {isExpanded && ( setIsExpanded(false)} /> )}
); }