Spaces:
Configuration error
Configuration error
Download frontend/src/components/features/images/image-preview.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 510 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/images/image-preview.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/features/images/image-preview.tsx
-
curl -L -o image-preview.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/images/image-preview.tsx
510 Bytes
| import { RemoveButton } from "#/components/shared/buttons/remove-button"; | |
| import { Thumbnail } from "./thumbnail"; | |
| interface ImagePreviewProps { | |
| src: string; | |
| onRemove?: () => void; | |
| size?: "small" | "large"; | |
| } | |
| export function ImagePreview({ | |
| src, | |
| onRemove, | |
| size = "small", | |
| }: ImagePreviewProps) { | |
| return ( | |
| <div data-testid="image-preview" className="relative w-fit shrink-0"> | |
| <Thumbnail src={src} size={size} /> | |
| {onRemove && <RemoveButton onClick={onRemove} />} | |
| </div> | |
| ); | |
| } | |