react-image-viewer

0.1.0 • Public • Published

react-image-viewer

Demo

demo

Installation

npm install react-image-viewer

Usage

class Demo extends React.Component {
  render() {
    const style = {
      width: 400,
      height: 300,
      backgroundSize: 'cover'
    };
    const config = {
      viewedImageSize: 0.8,
      backgroundOpacity: 0.6
    };
    return (
      <div>
        <ImageViewer
          style={style}
          config={config}
          image="http://***"
        />
      </div>
    );
  }
}

Package Sidebar

Install

npm i react-image-viewer

Weekly Downloads

22

Version

0.1.0

License

MIT

Last publish

Collaborators

  • foisonocean