UNPKG

victory-core

Version:
25 lines 1.09 kB
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import React, { forwardRef } from "react"; import { evaluateProp } from "../victory-util/helpers"; export const Path = /*#__PURE__*/forwardRef((props, ref) => { /* eslint-disable-next-line @typescript-eslint/no-unused-vars -- * origin conflicts with the SVG element's origin attribute */ const { desc, id, tabIndex, origin, ...rest } = props; const svgProps = { id: evaluateProp(id, props)?.toString(), tabIndex: evaluateProp(tabIndex, props), ...rest }; return desc ? /*#__PURE__*/React.createElement("path", _extends({}, svgProps, { ref: ref }), /*#__PURE__*/React.createElement("desc", null, desc)) : /*#__PURE__*/React.createElement("path", _extends({}, svgProps, { ref: ref })); });