@@ -56,7 +56,7 @@ var Origin = function (_Component) {
56
56
if ( ! props . onMouseEnter ) {
57
57
// Set default hover handler
58
58
props . onMouseEnter = function ( e ) {
59
- var action = _this2 . props . delayOn === 'show' ? _this2 . createWithDelay ( _actions . show , { el : e . target } ) : ( 0 , _actions . show ) ( _extends ( { } , _this2 . props , { el : e . target } ) ) ;
59
+ var action = [ 'show' , 'both' ] . indexOf ( _this2 . props . delayOn ) !== - 1 ? _this2 . createWithDelay ( _actions . show , { el : e . target } ) : ( 0 , _actions . show ) ( _extends ( { } , _this2 . props , { el : e . target } ) ) ;
60
60
_this2 . props . dispatch ( action ) ;
61
61
_this2 . props . onHover && _this2 . props . onHover ( e ) ;
62
62
} ;
@@ -65,7 +65,7 @@ var Origin = function (_Component) {
65
65
if ( ! props . onMouseLeave ) {
66
66
// Set default leave handler
67
67
props . onMouseLeave = function ( e ) {
68
- var action = _this2 . props . delayOn === 'hide' ? _this2 . createWithDelay ( _actions . hide ) : ( 0 , _actions . hide ) ( _extends ( { } , _this2 . props ) ) ;
68
+ var action = [ 'hide' , 'both' ] . indexOf ( _this2 . props . delayOn ) !== - 1 ? _this2 . createWithDelay ( _actions . hide ) : ( 0 , _actions . hide ) ( _extends ( { } , _this2 . props ) ) ;
69
69
_this2 . props . dispatch ( action ) ;
70
70
_this2 . props . onLeave && _this2 . props . onLeave ( e ) ;
71
71
} ;
@@ -90,7 +90,7 @@ var Origin = function (_Component) {
90
90
content : _react . PropTypes . string ,
91
91
place : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . arrayOf ( _react . PropTypes . string ) ] ) ,
92
92
delay : _react . PropTypes . oneOfType ( [ _react . PropTypes . bool , _react . PropTypes . number , _react . PropTypes . string ] ) ,
93
- delayOn : _react . PropTypes . oneOf ( [ 'show' , 'hide' ] ) ,
93
+ delayOn : _react . PropTypes . oneOf ( [ 'show' , 'hide' , 'both' ] ) ,
94
94
onMouseEnter : _react . PropTypes . func ,
95
95
onMouseLeave : _react . PropTypes . func
96
96
} ;
0 commit comments