import React , { Component , MouseEvent } from 'react' ; import bem from 'easy-bem' ; import ScrollContainer , { ScrollEvent } from 'react-indiana-drag-scroll' ; import './style.css' ; const cn = bem ( 'image-example' ) ; export default class Image extends Component { render ( ) { return ( < div className = { cn ( ) } > < ScrollContainer className = { cn ( 'container' ) } nativeMobileScroll = { false } onStartScroll = { ( event ) => { console . log ( 'onStartScroll' , event ) ; } } onScroll = { ( event ) => { console . log ( 'onScroll' , event ) ; } } onClick = { ( event ) => { console . log ( 'onClick' , event ) ; } } onEndScroll = { ( event ) => { console . log ( 'onEndScroll' , event ) ; } } > < img className = { cn ( 'image' ) } src = { require ( './background.jpg' ) } / > < /ScrollContainer> < /div>); } }