viewerjs-react
Version:
Typescript supported react wrapper for viewerjs.
39 lines (25 loc) • 841 B
Markdown
# viewerjs-react
> Typescript supported react wrapper for viewerjs.
[](https://www.npmjs.com/package/viewerjs-react) [](https://standardjs.com)
## Install
```bash
npm install --save viewerjs@^1.9.0 viewerjs-react
```
## Usage
```tsx
import React, { Component } from 'react'
import RViewerJS from 'viewerjs-react'
import 'viewerjs-react/dist/index.css'
class Example extends Component {
render() {
return <RViewerJS>
<img src="xxx" />
</RViewerJS>
}
}
```
## Props
### options
Will passby to viewerjs. See [ViewerJS Options Document](https://github.com/fengyuanchen/viewerjs/blob/master/README.md#options).
## License
MIT © [tinymins](https://github.com/tinymins)