// FilePreview.tsx import React from 'react'; import { X } from 'lucide-react'; interface FilePreviewProps { files: File[]; imageDataList: string[]; // or imagePreviews: string[] onRemove: (index: number) => void; } const FilePreview: React.FC = ({ files, imageDataList, onRemove }) => { if (!files || files.length === 0) { return null; // Or render a placeholder if desired } return (
{/* Add horizontal scrolling if needed */} {files.map((file, index) => (
{/* Display image preview or file icon */} {imageDataList[index] && (
{file.name}
)}
))}
); }; export default FilePreview;