Skip to content
This repository was archived by the owner on Nov 12, 2022. It is now read-only.

LogicamenteInfo/react-drop-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DropComponent

Travis npm package

This is a direct modification of Romgrk's DropZone for better management of the component and handling of files.

Install

npm i -S @logicamente.info/react-drop-component

How to use

import { DropComponent } from '@logicamente.info/react-drop-component'

<DropComponent onDrop={(file, text) => console.log(file, text)} />

Props

Name Description Default
onDrop (required) called when a file is dropped or selected. Signature: (file: HTML5File, text: String)
handleClick Handle click events on the rendered component true
dontRead Prevent reading the file content, if it's causing problems false
label Label on the component Select or Drop your file here
multiple Allows user to select or drop multiple files for each input false
accept File types that user can drop or pick from the file input dialog box *

Details

The component overwrites the onDrag/DragEnter/.../Drop props of the render function child.

About

A configurable React Dropzone Component

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors