import { useId } from 'react'; import FileIcon from '../../common/FileIcon'; import { FileDownloadProps } from './types'; import clsx from 'clsx'; const FileDownload = ({ className, cover, icon = 'Generic', isHighlighted, fileSize, fileType, fileUrl, title, ...props }: FileDownloadProps) => { const hasMetadata = !!fileType || !!fileSize; const metaContainerId = `file-download-${useId()}`; return (
{title} {hasMetadata &&
{fileType &&
File type
{fileType},
} {fileSize &&
File size
{fileSize}
}
}
); }; FileDownload.displayName = 'FileDownload'; export default FileDownload;