Last active
September 13, 2016 09:10
-
-
Save andyyou/c57a4cdc81e2b50a7548 to your computer and use it in GitHub Desktop.
react-coverflow support media query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import Coverflow from 'react-coverflow'; | |
import {StyleRoot} from 'radium'; | |
ReactDOM.render( | |
<StyleRoot> | |
<Coverflow | |
displayQuantityOfSide={2} | |
navigation={true} | |
enableHeading={true} | |
media={{ | |
'@media (max-width: 900px)': { | |
width: '600px', | |
height: '300px' | |
}, | |
'@media (min-width: 900px)': { | |
width: '960px', | |
height: '600px' | |
} | |
}} | |
> | |
<img src='images/album-1.png' alt='Album one' data-action="https://facebook.github.io/react/"/> | |
<img src='images/album-2.png' alt='Album two' data-action="http://passer.cc"/> | |
<img src='images/album-3.png' alt='Album three' data-action="https://doce.cc/"/> | |
<img src='images/album-4.png' alt='Album four' data-action="http://tw.yahoo.com"/> | |
</Coverflow> | |
</StyleRoot> | |
, | |
document.querySelector('.example_2') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment