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 1
1
.image-preview {
2
2
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
+ }
3
14
4
15
img {
5
16
height : 200px ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module.exports = React.createClass({
13
13
onMouseLeave = { this . handleMouseLeave }
14
14
>
15
15
{ this . props . animated && this . state . hovering ? this . video ( ) : this . image ( ) }
16
+ { this . props . animated && ! this . state . hovering ? this . icon ( ) : null }
16
17
</ div >
17
18
} ,
18
19
image : function ( ) {
@@ -27,6 +28,9 @@ module.exports = React.createClass({
27
28
</ video >
28
29
</ div >
29
30
} ,
31
+ icon : function ( ) {
32
+ return < span className = "glyphicon glyphicon-play" > </ span >
33
+ } ,
30
34
handleMouseEnter : function ( ) {
31
35
this . setState ( { hovering : true } ) ;
32
36
} ,
You can’t perform that action at this time.
0 commit comments