yagoubi-upload-images
Version:
96 lines (39 loc) • 1.68 kB
Markdown
>
[](https://www.npmjs.com/package/yagoubi-upload-images) [](https://standardjs.com)
A flexible and beautiful input for images for ReactJS with multiselect and creatable support.

```bash
npm install --save yagoubi-upload-images
```
```js
import React, { Component } from 'react'
import UploadImages from 'yagoubi-upload-images'
class Example extends Component {
onChange = (images) =>{
console.log(images)
}
render () {
return (
<UploadImages multiple onChange={this.onChange} />
)
}
}
```
| props | type | description |
|---|---|---|
| multiple | boolen | multi-images or not |
| placeholder | string | the placeholder that should diplay in images container |
| maxImages | number | if multiple you can add the maximum of number of images |
|maxImageSize | number | maximum file size |
| minImageSize | number | minimum file size |
| color | string | the color of the upload button exmple "#FFDC00" . the default is
| onError | method | executing when an error happen take one param is error|
| onChange | method | executing when image uploaded take one param is the images |
MIT © [yagoubi abdelkader](https://github.com/yagoubigithub)