1.0.1 • Published 4 years ago

react-single-image-viewer v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

react-single-image-viewer

react image view component

NPM JavaScript Style Guide

Install

npm install --save react-single-image-viewer

Usage

import React, { Component } from 'react'

import ImageView from 'react-single-image-viewer'
import 'react-single-image-viewer/dist/index.css'

class Example extends Component {
  render() {
    return <ImageView src="xxxxx" height="100" width="200" callback="xxxx"/>
  }
}

Params

namedescription
srcimg path
heightimg height
widthimg width
callbackwhen img load error show path

Notice

Because of React hooks to run tests, you need to download react,react-dom yourself,or add them to devDependencies

License

MIT © FriendsA

1.0.1

4 years ago

1.0.0

4 years ago