1.7.0 • Published 2 years ago

file-dropper v1.7.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

File Dropper by Clunesate

React file upload form

Usage

Install

npm install file-dropper

Connection

  1. Import library in your file import {FileDropper} from "file-dropper";
  2. Paste the component where you need it <FileDropper/>

Params

Param nameRequiredTypeExample UsageDescription
callbackFileFalseFunction<FileDropper callbackFile={(f) => yourFunction(f)}/>Callback function that returns the selected file
containerClassesFalseArray of String<FileDropper containerClasses={'my-awesome-class'}/>Allows you to set your own classes for the main container
blockClassesFalseArray of String<FileDropper blockClasses={'my-awesome-class'}/>Allows you to set your own classes for the form
acceptFilesFalseString<FileDropper acceptFiles={'img/png, img/gif'}/>Setting allowed file types separated by commas
fileSizeFalseIntMaximum file size, default is 104857600
fileIconComponentFalseReact Component<FileDropper fileIconComponent={}/>Main file icon
validateSuccessIconComponentFalseReact Component<FileDropper fileIconComponent={}/>Success validate icon
validateWrongIconComponentFalseReact Component<FileDropper fileIconComponent={}/>Wrong validate icon