react-importer

A modern importer written in React

NPM JavaScript Style Guide

Demo

Install

npm install --save react-importer

Usage

<Importer
  fields={[
    {
      label: "Name", key: "name", validators: [
        { validate: "required" },
      ]
    },
    {
      label: "Email", key: "email", validators: [
        { validate: "required" },
        { validate: "unique", error: "This email is not unique" },
      ]
    },
    { label: "State", key: "state" },
  ]}
  onComplete={(data) => {
    console.log(data)
  }}
/>

License

MIT © czhu12

GitHub

View Github