Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/Delay.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ var Delay = function (_Component) {
return this.props.children;
}

return null;
return this.props.childrenWaiting;
}
}]);

Expand All @@ -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;

Expand Down
4 changes: 3 additions & 1 deletion src/Delay.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -32,7 +34,7 @@ class Delay extends Component {
return this.props.children;
}

return null;
return this.props.childrenWaiting;
}
}

Expand Down