react-imageviewer
Version:
A simple image viewer for react
29 lines (28 loc) • 1.21 kB
JavaScript
import React, { Component } from 'react';
import ReactImageViewer from './react-imageviewer';
const items=[
{url:'https://fengyuanchen.github.io/viewer/img/tibet-2.jpg'},
{url:'https://fengyuanchen.github.io/viewer/img/tibet-1.jpg'},
{url:'https://fengyuanchen.github.io/viewer/img/tibet-4.jpg'},
{url:'https://fengyuanchen.github.io/viewer/img/tibet-7.jpg'},
{url:'https://fengyuanchen.github.io/viewer/img/tibet-8.jpg'},
{url:'https://fengyuanchen.github.io/viewer/img/tibet-9.jpg'}
]
export default class App extends Component{
constructor(props){
super(props);
}
render(){
return (
<div>
<ReactImageViewer type="dom">
<image class="xxx YYY" src="https://fengyuanchen.github.io/viewer/img/tibet-4.jpg"/>
<image class="xxx" src="https://fengyuanchen.github.io/viewer/img/tibet-2.jpg"/>
<image class="xxx" src="https://fengyuanchen.github.io/viewer/img/tibet-2.jpg"/>
<image class="xxx" src="https://fengyuanchen.github.io/viewer/img/tibet-1.jpg"/>
<image class="xxx" src="https://fengyuanchen.github.io/viewer/img/tibet-8.jpg"/>
</ReactImageViewer>
</div>
)
}
}