import { Show } from "solid-js"; export interface DropzoneProps { onDrop: (files: File[]) => void; accept?: string; fileHolder?: string | ArrayBuffer | null; preSet?: string | null; } export default function Dropzone(props: DropzoneProps) { let inputRef: HTMLInputElement | undefined; const handleFileChange = (e: Event) => { const target = e.target as HTMLInputElement; const files = target.files; if (files && files.length > 0) { props.onDrop(Array.from(files)); } }; const handleDrop = (e: DragEvent) => { e.preventDefault(); const files = e.dataTransfer?.files; if (files && files.length > 0) { props.onDrop(Array.from(files)); } }; const handleDragOver = (e: DragEvent) => { e.preventDefault(); }; return (
inputRef?.click()} >
); }