Reusable React input file component.
MIT License
Reusable React input file component.
$ yarn add react-input-files
import InputFiles from 'react-input-files';
<InputFiles onChange={files => console.log(files)}>
<button>Upload</button>
</InputFiles>;
type Props = {
children: React.Node,
onChange: (files: Array<File>, e: SyntheticEvent<HTMLInputElement>) => void,
accept?: string,
style?: Object,
multiple?: boolean,
};
$ 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