From 1d0c9aa9d8f91e314053dbf2ed37f5fbe2586b10 Mon Sep 17 00:00:00 2001 From: Marco Wettstein Date: Mon, 11 Dec 2017 15:35:53 +0100 Subject: [PATCH 1/2] Update Delay.js --- src/Delay.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Delay.js b/src/Delay.js index 49470c7..01621f0 100644 --- a/src/Delay.js +++ b/src/Delay.js @@ -4,11 +4,13 @@ import PropTypes from 'prop-types'; class Delay extends Component { static propTypes = { children: PropTypes.node, + childrenWaiting: PropTypes.node, wait: PropTypes.number, }; static defaultProps = { wait: 250, + childrenWaiting: null }; state = { @@ -32,7 +34,7 @@ class Delay extends Component { return this.props.children; } - return null; + return this.props.childrenWaiting; } } From 7fd123bf71d31cf00654aa5883aa47a008c4b355 Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 11 Dec 2017 15:42:29 +0100 Subject: [PATCH 2/2] build --- lib/Delay.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Delay.js b/lib/Delay.js index c67ffe9..1b8856e 100644 --- a/lib/Delay.js +++ b/lib/Delay.js @@ -159,7 +159,7 @@ var Delay = function (_Component) { return this.props.children; } - return null; + return this.props.childrenWaiting; } }]); @@ -168,10 +168,12 @@ var Delay = function (_Component) { Delay.propTypes = { children: _propTypes2.default.node, + childrenWaiting: _propTypes2.default.node, wait: _propTypes2.default.number }; Delay.defaultProps = { - wait: 250 + wait: 250, + childrenWaiting: null }; exports.default = Delay;