import React from 'react'; import { FileText, FileCode, Download, Eye } from 'lucide-react'; import { FileData } from '../types'; import { formatBytes, formatDate } from '../utils/formatters'; interface FileItemProps { file: FileData; onPreview: (url: string) => void; } const FileItem: React.FC = ({ file, onPreview }) => { const getFileIcon = () => { switch (file.type) { case 'pdf': return ; case 'html': return ; default: return ; } }; return (
{getFileIcon()} {file.name}
{formatBytes(file.size)}
{formatDate(file.lastModified)}
{file.type === 'html' && ( )} Download
); }; export default FileItem;