file-upload-modal

1.0.0 • Public • Published

File Upload Modal

Select a csv file, preview, edit and/or delete rows before submitting.

file-upload-modal

Installation

yarn add file-upload-modal react-file-reader-input react-modal csvtojson

Usage

import UploadModal from 'file-upload-modal'

export const Upload = () => {
    const handleSave = (data) => {
        console.log(data)
    }
    return (
        <UploadModal onSave={handleSave} />
    )
}

Props

Name Description
onSave (required) A function to receive the data (as json) of the selected file after editing
buttonComponent (optional) A button component to be rendered instead of the default button component

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i file-upload-modal

    Weekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    120 kB

    Total Files

    4

    Last publish

    Collaborators

    • imoris