import { UploadCloud } from 'lucide-react'; import { DropZone } from '~/components/ui/drop-zone'; import { Text } from '~/components/ui/text'; import { SelectedFile } from '~/components/assets/form/selected-file'; import { formatFileSize } from '~/lib/format'; interface FilePickerProps { id?: string; accept: string; file: File | null; existing: string; invalid?: boolean; onFileChange: (file: File | null) => void; onClearExisting: () => void; } export function FilePicker({ id, accept, file, existing, invalid, onFileChange, onClearExisting }: FilePickerProps) { return ( {file ? ( onFileChange(null)} /> ) : existing ? ( ) : (
Click to upload or drag a file here{' '} ({accept})
)}
); }