@@ -11,6 +11,8 @@ var index_1 = require('../../index');
1111var HintButton_1 = require ( './HintButton' ) ;
1212var Card_1 = require ( 'material-ui/Card' ) ;
1313var help_1 = require ( 'material-ui/svg-icons/action/help' ) ;
14+ var actions_1 = require ( '../../../actions' ) ;
15+ var selectors_2 = require ( '../../../selectors' ) ;
1416var styles = {
1517 position : 'relative' ,
1618 margin : '5px auto 10px' ,
@@ -23,23 +25,26 @@ var Hints = (function (_super) {
2325 _super . apply ( this , arguments ) ;
2426 }
2527 Hints . prototype . render = function ( ) {
26- var hint = this . props . hint ;
28+ var _a = this . props , hint = _a . hint , hintPosition = _a . hintPosition , hintsLength = _a . hintsLength , hintPositionSet = _a . hintPositionSet ;
2729 if ( ! hint ) {
2830 return null ;
2931 }
3032 return ( React . createElement ( Card_1 . Card , { style : styles } ,
3133 React . createElement ( Card_1 . CardHeader , { title : 'Hints' , avatar : React . createElement ( help_1 . default , null ) , actAsExpander : true , showExpandableButton : true } ) ,
3234 React . createElement ( Card_1 . CardText , { className : 'cr-task-hint' , expandable : true } ,
33- React . createElement ( index_1 . Markdown , null , hint )
35+ React . createElement ( index_1 . Markdown , { children : hint } )
3436 ) ,
3537 React . createElement ( Card_1 . CardActions , { style : { paddingBottom : '30px !important' } , expandable : true , className : 'cr-task-hints-actions' } ,
36- React . createElement ( HintButton_1 . default , { type : 'prev' , label : 'Previous' } ) ,
37- React . createElement ( HintButton_1 . default , { type : 'next' , label : 'Next' } ) ) ) ) ;
38+ React . createElement ( HintButton_1 . default , { type : 'prev' , label : 'Previous' , hintPosition : hintPosition , hintsLength : hintsLength , hintPositionSet : hintPositionSet } ) ,
39+ React . createElement ( HintButton_1 . default , { type : 'next' , label : 'Next' , hintPosition : hintPosition , hintsLength : hintsLength , hintPositionSet : hintPositionSet } ) ) ) ) ;
3840 } ;
3941 return Hints ;
4042} ( React . Component ) ) ;
4143var mapStateToProps = function ( state ) { return ( {
4244 hint : selectors_1 . hintSelector ( state ) ,
45+ hintPosition : state . hintPosition ,
46+ hintsLength : selectors_2 . hintsSelector ( state ) . length ,
4347} ) ; } ;
48+ var mapDispatchToProps = { hintPositionSet : actions_1 . hintPositionSet } ;
4449Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
45- exports . default = react_redux_1 . connect ( mapStateToProps ) ( Hints ) ;
50+ exports . default = react_redux_1 . connect ( mapStateToProps , mapDispatchToProps ) ( Hints ) ;
0 commit comments