Skip to content

sendhq/file-upload-modal

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published