mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 11:51:17 +00:00
22 lines
422 B
TypeScript
22 lines
422 B
TypeScript
import type { FileInfo } from "./file"
|
|
import { ImagePreviewDialog } from "./image-preview-dialog"
|
|
|
|
export function FilePreviewDialog({
|
|
openedFile,
|
|
onClose,
|
|
}: {
|
|
openedFile: FileInfo
|
|
onClose: () => void
|
|
}) {
|
|
switch (openedFile.mimeType) {
|
|
case "image/jpeg":
|
|
case "image/png":
|
|
case "image/gif":
|
|
return (
|
|
<ImagePreviewDialog openedFile={openedFile} onClose={onClose} />
|
|
)
|
|
default:
|
|
return null
|
|
}
|
|
}
|