Reusable React file picker component.
$ npm install pro-file-uploader
import FilePicker from 'pro-file-picker';
<FilePicker onChange={files => console.log(files)}>
<button>Upload</button>
</FilePicker>;
type Props = {
children: React.Node,
onChange: (files: Array<File>, e: SyntheticEvent<HTMLInputElement>) => void,
accept?: string,
multiple?: boolean,
};
- node >= 11.9.0
- yarn >= 1.13.0
$ yarn install --pure-lockfile
$ yarn start
$ yarn run format
$ yarn run eslint
$ yarn run flow
$ yarn run test:watch
$ yarn run build
$ npm version patch
$ npm run changelog
git commit & push
- ⇄ 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.