Skip to content

Instantly share code, notes, and snippets.

@asalem1
Created March 3, 2018 17:55
Show Gist options
  • Save asalem1/b732568fde235a492f4e837055967d02 to your computer and use it in GitHub Desktop.
Save asalem1/b732568fde235a492f4e837055967d02 to your computer and use it in GitHub Desktop.
React Coverflow Example
var React = require('react');
var ReactDOM = require('react-dom');
var Coverflow = require('react-coverflow');
var fn = function () {
/* do you want */
}
ReactDOM.render(
<Coverflow
width={960}
height={480}
displayQuantityOfSide={2}
navigation={false}
enableHeading={false}
>
<div
onClick={() => fn()}
onKeyDown={() => fn()}
role="menuitem"
tabIndex="0"
>
<img
src='[image/path/please_change]'
alt='title or description'
style={{ display: 'block', width: '100%' }}
/>
</div>
<img src='[image/path/please_change]' alt='title or description' data-action="http://andyyou.github.io/react-coverflow/"/>
<img src='[image/path/please_change]' alt='title or description' data-action="http://andyyou.github.io/react-coverflow/"/>
</Coverflow>,
document.querySelector('.content')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment