import type { Body, Meta, UppyFile } from '@uppy/core' import type { ComponentChildren } from 'preact' import getFileTypeIcon from '../utils/getFileTypeIcon.js' interface FilePreviewProps { file: UppyFile } export default function FilePreview( props: FilePreviewProps, ): ComponentChildren { const { file } = props if (file.preview) { return ( {file.name} ) } const { color, icon } = getFileTypeIcon(file.type) return (
{icon}
) }