UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

8 lines 418 B
import { jsx as _jsx } from "react/jsx-runtime"; import { usePosition } from '../../hooks.js'; export function Text(props) { const { x: xOld, y: yOld, children, color, xAxis = 'x', yAxis = 'y', ...otherProps } = props; const { x, y } = usePosition({ x: xOld, y: yOld, xAxis, yAxis }); return (_jsx("text", { x: x, y: y, fill: color, ...otherProps, children: children })); } //# sourceMappingURL=Text.js.map