({ info }: PreviewImageProps)
| 8 | }; |
| 9 | |
| 10 | export function PreviewImage({ info }: PreviewImageProps) { |
| 11 | let properties: Array<PreviewProperty> = []; |
| 12 | |
| 13 | if (info.mimeType) { |
| 14 | properties.push({ key: "mimeType", title: info.mimeType }); |
| 15 | } |
| 16 | |
| 17 | if (info.size) { |
| 18 | properties.push({ key: "fileSize", title: `${formatBytes(info.size)}` }); |
| 19 | } |
| 20 | |
| 21 | const src = info.image ? info.image.url : info.url; |
| 22 | |
| 23 | return ( |
| 24 | <PreviewBox link={info.url}> |
| 25 | <img className="block max-h-96 w-full object-contain" src={src} /> |
| 26 | <PreviewProperties properties={properties} /> |
| 27 | </PreviewBox> |
| 28 | ); |
| 29 | } |
nothing calls this directly
no test coverage detected