@react-styless/file-uploader
v1.0.1
Published
Simple file uploader component for React without style.
Readme
react-file-uploader
Simple file uploader component for React without style.
Installation
// with npm
$ npm install @react-styless/file-uploader --saveUsage
This is the basic usage of file-uploader
import Uploader from '@react-styless/file-uploader';
const App = () => {
const handleSuccess = (e) => {
console.log(e);
}
return (
<Uploader onSuccess={handleSuccess}>
<button>Upload</button> (/* You can input any component */)
</Uploader>
);
}| Attribute | Type | Description | |--|--|--| | id | string | | | multiple | boolean | | | children | ReactElement | | | onSuccess | (f:FileList) => void | | | accept | string | |
