@vx/responsive
Advanced tools
Comparing version 0.0.153 to 0.0.158
@@ -23,2 +23,6 @@ 'use strict'; | ||
var _debounce = require('lodash/debounce'); | ||
var _debounce2 = _interopRequireDefault(_debounce); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -41,3 +45,3 @@ | ||
_this.state = { width: 0, height: 0, top: 0, left: 0 }; | ||
_this.resize = _this.resize.bind(_this); | ||
_this.resize = (0, _debounce2.default)(_this.resize.bind(_this), props.debounceTime); | ||
_this.setTarget = _this.setTarget.bind(_this); | ||
@@ -142,2 +146,5 @@ return _this; | ||
ParentSize.defaultProps = { | ||
debounceTime: 300 | ||
}; | ||
exports.default = ParentSize; | ||
@@ -148,3 +155,4 @@ | ||
className: _propTypes2.default.string, | ||
children: _propTypes2.default.func.isRequired | ||
children: _propTypes2.default.func.isRequired, | ||
debounceTime: _propTypes2.default.number | ||
}; |
{ | ||
"name": "@vx/responsive", | ||
"version": "0.0.153", | ||
"version": "0.0.158", | ||
"description": "vx responsive svg", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19948
346