Skip to content

UnderNotic/react-file-load

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

react-file-load

Build Status BCH compliance dependencies Status License: MIT

NPM

React component for loading data from files. deaddesk.top/react-file-load

Installing

Package is available in npm

npm install react-file-load --save

Using yarn

yarn add react-file-load --save

Size

7,5Kb Gzipped 2.9Kb

Api

<ReactLoadComponent 
    text = "Button text"
    fromColor = "yellow"
    toColor = "black"
    finishedColor = "green"
    accept = ".csv"
    onChange = {inputOnChangeEvent => console.log("file changed")}
    onProgress = {progressNumber => console.log("progress between 0 and 100")}
    onDataChunk = {(dataChunk, error) => console.log("invoked with data chunk")}
    onFinished = {() => console.log("finished reading")}
    readeryConfig = { splitBy: /\r?\n/, encoding: "UTF-8" }
    chunkSize = {1024}
/>

All parameters are optional except text.

Example usage

See deaddesk.top/react-file-load

Compatibility

Licensing

The code in this project is licensed under MIT license.