react-imagepreview
v1.0.5
Published
A react image Preview tools
Downloads
1
Readme
Introduction
Previews images according to the imgUrl and the img Element
Install with npm:
npm install react-imagepreview
Usage
import React from 'react'
import ImagePreview from 'react-imagepreview'
function MyComponent() {
return (
<div>
<img src={src} onClick={(e) => ImagePreview.show(src, e.target)}>
</div>
)
}
Demo
cd demo
npm install
npm start