File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 11.image-preview {
22 display : inline-block ;
3+ position : relative ;
4+
5+ .glyphicon {
6+ position : absolute ;
7+ top : 50% ;
8+ left : 50% ;
9+ transform : translate (-50% , -50% );
10+ font-size : 50px ;
11+ opacity : .5 ;
12+ color : white ;
13+ }
314
415 img {
516 height : 200px ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module.exports = React.createClass({
1313 onMouseLeave = { this . handleMouseLeave }
1414 >
1515 { this . props . animated && this . state . hovering ? this . video ( ) : this . image ( ) }
16+ { this . props . animated && ! this . state . hovering ? this . icon ( ) : null }
1617 </ div >
1718 } ,
1819 image : function ( ) {
@@ -27,6 +28,9 @@ module.exports = React.createClass({
2728 </ video >
2829 </ div >
2930 } ,
31+ icon : function ( ) {
32+ return < span className = "glyphicon glyphicon-play" > </ span >
33+ } ,
3034 handleMouseEnter : function ( ) {
3135 this . setState ( { hovering : true } ) ;
3236 } ,
You can’t perform that action at this time.
0 commit comments