victory-pie
Advanced tools
Comparing version 36.7.0 to 36.8.1
# victory-pie | ||
## 36.8.1 | ||
## 36.8.0 | ||
### Patch Changes | ||
- Remove usage of defaultProps from components ([#2679](https://github.com/FormidableLabs/victory/pull/2679)) | ||
## 36.7.0 | ||
@@ -4,0 +12,0 @@ |
@@ -82,4 +82,10 @@ import _assign from "lodash/assign"; | ||
var defaultProps = { | ||
pathComponent: /*#__PURE__*/React.createElement(Path, null), | ||
role: "presentation", | ||
shapeRendering: "auto" | ||
}; | ||
var Slice = function (props) { | ||
props = evaluateProps(props); | ||
props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props)); | ||
var defaultTransform = props.origin ? "translate(".concat(props.origin.x, ", ").concat(props.origin.y, ")") : undefined; | ||
@@ -111,7 +117,2 @@ return /*#__PURE__*/React.cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, { | ||
}); | ||
Slice.defaultProps = { | ||
pathComponent: /*#__PURE__*/React.createElement(Path, null), | ||
role: "presentation", | ||
shapeRendering: "auto" | ||
}; | ||
export default Slice; |
@@ -113,4 +113,10 @@ "use strict"; | ||
var defaultProps = { | ||
pathComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.Path, null), | ||
role: "presentation", | ||
shapeRendering: "auto" | ||
}; | ||
var Slice = function (props) { | ||
props = evaluateProps(props); | ||
props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props)); | ||
var defaultTransform = props.origin ? "translate(".concat(props.origin.x, ", ").concat(props.origin.y, ")") : undefined; | ||
@@ -142,8 +148,3 @@ return /*#__PURE__*/_react.default.cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, { | ||
}); | ||
Slice.defaultProps = { | ||
pathComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.Path, null), | ||
role: "presentation", | ||
shapeRendering: "auto" | ||
}; | ||
var _default = Slice; | ||
exports.default = _default; |
{ | ||
"name": "victory-pie", | ||
"version": "36.7.0", | ||
"version": "36.8.1", | ||
"description": "Pie Component for Victory", | ||
@@ -25,4 +25,4 @@ "keywords": [ | ||
"prop-types": "^15.8.1", | ||
"victory-core": "^36.7.0", | ||
"victory-vendor": "^36.7.0" | ||
"victory-core": "^36.8.1", | ||
"victory-vendor": "^36.8.1" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependencies": { |
@@ -71,4 +71,10 @@ import React from "react"; | ||
const defaultProps = { | ||
pathComponent: <Path />, | ||
role: "presentation", | ||
shapeRendering: "auto", | ||
}; | ||
const Slice = (props) => { | ||
props = evaluateProps(props); | ||
props = evaluateProps({ ...defaultProps, ...props }); | ||
const defaultTransform = props.origin | ||
@@ -106,8 +112,2 @@ ? `translate(${props.origin.x}, ${props.origin.y})` | ||
Slice.defaultProps = { | ||
pathComponent: <Path />, | ||
role: "presentation", | ||
shapeRendering: "auto", | ||
}; | ||
export default Slice; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1384040
277228
23373
Updatedvictory-core@^36.8.1
Updatedvictory-vendor@^36.8.1