@semcore/chart
Version:
Semrush Chart Component
51 lines (49 loc) • 2.07 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _createSuper from "@babel/runtime/helpers/createSuper";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
var _excluded = ["fillOpacity", "activeFillOpacity", "active"];
import React from 'react';
// @ts-ignore
import { Layer } from 'recharts';
import propsForElement from '@semcore/utils/lib/propsForElement';
import { colors } from '../../utils/colors';
/**
* @deprecated Please, use package `@semcore/ui/d3-chart` instead. Package `@semcore/chart` is deprecated.
*/
var VennIntersection = /*#__PURE__*/function (_React$PureComponent) {
_inherits(VennIntersection, _React$PureComponent);
var _super = _createSuper(VennIntersection);
function VennIntersection() {
_classCallCheck(this, VennIntersection);
return _super.apply(this, arguments);
}
_createClass(VennIntersection, [{
key: "render",
value: function render() {
var _this$props = this.props,
fillOpacity = _this$props.fillOpacity,
activeFillOpacity = _this$props.activeFillOpacity,
active = _this$props.active,
other = _objectWithoutProperties(_this$props, _excluded);
return /*#__PURE__*/React.createElement(Layer, {
className: "venn-area-intersection"
}, /*#__PURE__*/React.createElement("path", _extends({
fillOpacity: active ? activeFillOpacity : fillOpacity
}, propsForElement(other))));
}
}]);
return VennIntersection;
}(React.PureComponent);
_defineProperty(VennIntersection, "displayName", 'VennIntersection');
_defineProperty(VennIntersection, "defaultProps", {
fillOpacity: 0,
activeFillOpacity: 0.1,
strokeWidth: 2,
stroke: colors['white']
});
export { VennIntersection as default };
//# sourceMappingURL=VennIntersection.js.map