UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

39 lines (36 loc) 1.27 kB
import * as React from 'react'; import { clsx } from '../../node_modules/clsx/dist/clsx.js'; import { adaptEventHandlers } from '../util/types.js'; import { svgPropertiesNoEvents } from '../util/svgPropertiesNoEvents.js'; import { isNumber } from '../util/DataUtils.js'; 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); } /** * Renders a dot in the chart. * * This component accepts X and Y coordinates in pixels. * If you need to position the rectangle based on your chart's data, * consider using the {@link ReferenceDot} component instead. * * @param props * @constructor */ var Dot = props => { var { cx, cy, r, className } = props; var layerClass = clsx('recharts-dot', className); if (isNumber(cx) && isNumber(cy) && isNumber(r)) { return /*#__PURE__*/React.createElement("circle", _extends({}, svgPropertiesNoEvents(props), adaptEventHandlers(props), { className: layerClass, cx: cx, cy: cy, r: r })); } return null; }; export { Dot }; //# sourceMappingURL=Dot.js.map