Image upload module with react, imgur, typescript.
- simple config and basic style
- Output images with array
- able to change image url order / delete
styled-components is peerDependencies. If you don't install styled-components yarn add styled-components first.
yarn add @yosgo/image-uploader
props | required | type | description |
---|---|---|---|
imgurClientId | yes | string | 至此申請 imgur app 並取得 imgurClientId |
urls | yes | Array | 陣列,陣列值為圖片網址字串 |
onChange | yes | Function | 更新 urls 陣列 |
description | no | string | 上傳描述 |
hint | no | string | 相關提示 |
btnText | no | string | 上傳按鈕文字 |
multiple | no | boolean | 是否一次上傳多張,預設為單張 |
View example on CodeSandBox