1.7.0 • Published 2 years ago
file-dropper v1.7.0
File Dropper by Clunesate
React file upload form
Usage
Install
npm install file-dropper
Connection
- Import library in your file
import {FileDropper} from "file-dropper";
- Paste the component where you need it
<FileDropper/>
Params
Param name | Required | Type | Example Usage | Description |
---|---|---|---|---|
callbackFile | False | Function | <FileDropper callbackFile={(f) => yourFunction(f)}/> | Callback function that returns the selected file |
containerClasses | False | Array of String | <FileDropper containerClasses={'my-awesome-class'}/> | Allows you to set your own classes for the main container |
blockClasses | False | Array of String | <FileDropper blockClasses={'my-awesome-class'}/> | Allows you to set your own classes for the form |
acceptFiles | False | String | <FileDropper acceptFiles={'img/png, img/gif'}/> | Setting allowed file types separated by commas |
fileSize | False | Int | Maximum file size, default is 104857600 | |
fileIconComponent | False | React Component | <FileDropper fileIconComponent={}/> | Main file icon |
validateSuccessIconComponent | False | React Component | <FileDropper fileIconComponent={}/> | Success validate icon |
validateWrongIconComponent | False | React Component | <FileDropper fileIconComponent={}/> | Wrong validate icon |