| 1 | var _excluded = ["children", "className"];
|
|---|
| 2 | function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|---|
| 3 | function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|---|
| 4 | function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|---|
| 5 | import * as React from 'react';
|
|---|
| 6 | import { clsx } from 'clsx';
|
|---|
| 7 | import { svgPropertiesAndEvents } from '../util/svgPropertiesAndEvents';
|
|---|
| 8 | /**
|
|---|
| 9 | * Creates an SVG group element to group other SVG elements.
|
|---|
| 10 | *
|
|---|
| 11 | * Useful if you want to apply transformations or styles to a set of elements
|
|---|
| 12 | * without affecting other elements in the SVG.
|
|---|
| 13 | *
|
|---|
| 14 | * @link https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/g
|
|---|
| 15 | */
|
|---|
| 16 | export var Layer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|---|
| 17 | var {
|
|---|
| 18 | children,
|
|---|
| 19 | className
|
|---|
| 20 | } = props,
|
|---|
| 21 | others = _objectWithoutProperties(props, _excluded);
|
|---|
| 22 | var layerClass = clsx('recharts-layer', className);
|
|---|
| 23 | return /*#__PURE__*/React.createElement("g", _extends({
|
|---|
| 24 | className: layerClass
|
|---|
| 25 | }, svgPropertiesAndEvents(others), {
|
|---|
| 26 | ref: ref
|
|---|
| 27 | }), children);
|
|---|
| 28 | }); |
|---|