0.1.1 • Published 5 years ago

pro-file-uploader v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

pro-file-picker

Reusable React file picker component.

Travis Codecov Status npm package npm downloads

prettier license

Installation

$ npm install pro-file-uploader

Usage

import FilePicker from 'pro-file-picker';

<FilePicker onChange={files => console.log(files)}>
  <button>Upload</button>
</FilePicker>;

API

type Props = {
  children: React.Node,
  onChange: (files: Array<File>, e: SyntheticEvent<HTMLInputElement>) => void,
  accept?: string,
  multiple?: boolean,
};

Development

Requirements

  • node >= 11.9.0
  • yarn >= 1.13.0
$ yarn install --pure-lockfile
$ yarn start

Test

$ yarn run format
$ yarn run eslint
$ yarn run flow
$ yarn run test:watch
$ yarn run build

Publish

$ npm version patch
$ npm run changelog
git commit & push

CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests.

LICENSE

MIT: http://michaelhsu.mit-license.org