JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q41287F
  • License MIT

Package Exports

  • file-upload-modal

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (file-upload-modal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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