Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/systemlight/react-wb-imageviewer
:clapper: Images viewer is a react component use in mobile website App, that function same as Weibo native viewer.【移动端图片放大查看器】
https://github.com/systemlight/react-wb-imageviewer
images javascript react viewer weibo
Last synced: 2 days ago
JSON representation
:clapper: Images viewer is a react component use in mobile website App, that function same as Weibo native viewer.【移动端图片放大查看器】
- Host: GitHub
- URL: https://github.com/systemlight/react-wb-imageviewer
- Owner: SystemLight
- License: mit
- Created: 2020-04-21T10:45:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-15T02:48:27.000Z (over 1 year ago)
- Last Synced: 2024-11-07T14:17:55.501Z (8 days ago)
- Topics: images, javascript, react, viewer, weibo
- Language: JavaScript
- Homepage:
- Size: 1.43 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-wb-imageviewer
[![NPM version](https://img.shields.io/npm/v/react-wb-imageviewer.svg)](https://www.npmjs.com/package/react-wb-imageviewer)
> 基于react的一个超级简易的移动端图片查看器。
### 安装
```
npm i react-wb-imageviewer
```### 使用举例
```
function App() {
let [open, setOpen] = React.useState(false)return (
<div>
<button onClick={() => {
setOpen(true)
}}>打开图片
</button><WbImageViewer visibility={open}
src={'https://t7.baidu.com/it/u=2291349828,4144427007&fm=193&f=GIF'}
onClose={() => {
setOpen(false)
}} />
</div>
)
}ReactDOM.createRoot(
document.querySelector('#app')
).render(<App />)```