File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ var Theatre = React.createClass({
10
10
mixins : [ PureRenderMixin , StyleMixin ] ,
11
11
12
12
propTypes : {
13
+ entries : React . PropTypes . arrayOf ( React . PropTypes . element ) . isRequired ,
13
14
closeHandler : React . PropTypes . func . isRequired ,
14
15
showProgress : React . PropTypes . bool ,
15
16
openItemIndex : React . PropTypes . number ,
@@ -34,6 +35,10 @@ var Theatre = React.createClass({
34
35
return ( this . state . currentItem / this . props . entries . length ) * 100 ;
35
36
} ,
36
37
38
+ _close : function ( event ) {
39
+ this . props . closeHandler ( this . state . currentIndex ) ;
40
+ } ,
41
+
37
42
// EVENT HANDLERS
38
43
39
44
_bindKeys : function ( event ) {
@@ -88,7 +93,7 @@ var Theatre = React.createClass({
88
93
< div className = "theatre-bodyWrapper" style = { this . _theatreBodyWrapperStyle ( ) } >
89
94
< div className = "theatre-header" style = { this . _theatreHeaderStyle ( ) } >
90
95
< div className = "theatre-select" style = { this . _theatreSelectStyle ( ) } > </ div >
91
- < div className = "theatre-close" style = { this . _theatreCloseStyle ( ) } onClick = { this . props . closeHandler } > x</ div >
96
+ < div className = "theatre-close" style = { this . _theatreCloseStyle ( ) } onClick = { this . _close } > x</ div >
92
97
</ div >
93
98
< div className = "theatre-content" style = { this . _theatreContentStyle ( ) } >
94
99
{ this . props . entries [ this . state . currentItem ] }
You can’t perform that action at this time.
0 commit comments