To install, you can use npm or yarn:
$ npm install toodle-dropzone
$ yarn add toodle-dropzone
Here is a simple example of toodle-dropzone
import DropZone from "toodle-dropzone";
const App = () => {
const handleFileOnChange = (file) => {
console.log(file);
console.log(file.name);
}
return (
<div className="App">
<DropZone
handleFileOnChange={handleFileOnChange}
className="add-your-custom-css"
accept="image/*" // Add any file type you need
>
Drag or Upload
</DropZone >
</div>
);
}
export default App;