import { useToggle } from "@react-hookz/web"; import React from "react"; import { FileDrop } from "react-file-drop"; export default function DropInput({ value: files, onChange, emptyContent, draggingContent, hasFilesContent, height, multiple = false, allowedType = "*", classes = { base: "", idle: "", dragging: "", }, }) { const [isDragging, toggleDrag] = useToggle(false); const fileInputRef = React.useRef(null); const onAddFiles = (_files) => { onChange(_files); // do something with your files... }; const uploadClick = () => { fileInputRef.current.click(); }; const status = isDragging ? "dragging" : files ? "has-files" : "empty"; return (