Socket
Socket
Sign inDemoInstall

react-single-image-viewer

Package Overview
Dependencies
8
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-single-image-viewer

react image view component


Version published
Weekly downloads
17
increased by183.33%
Maintainers
1
Install size
319 kB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 05 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc