'use strict'
import React from 'react'
import {ApFlip, ApFlipStyle} from 'apeman-react-flip'
const ExampleComponent = React.createClass({
getInitialState () {
return {
focusIndex: 0
}
},
render () {
return (
<div>
<ApFlipStyle />
<ApFlip images={ [
'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/01.jpg',
'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/02.jpg',
'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/03.jpg',
'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/04.jpg',
'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/05.jpg',
'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/06.jpg'
] }
focusIndex={ state.focusIndex }
onFlip={ (amount) => s.setState({ focusIndex: s.state.focusIndex + amount })}
onClose={ () => s.setState({ focusIndex: -1 })}
/>
<a onClick={ () => s.setState({ focusIndex: 0 })}> Show Flip</a>
</div>
)
}
})