react-sparklines-typescript
Version:
react-sparklines rewritten in typescript and modern react patterns
14 lines • 769 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var SparklinesText = function (props) {
var _a = props.point, point = _a === void 0 ? { x: undefined, y: undefined } : _a, text = props.text, fontSize = props.fontSize, fontFamily = props.fontFamily;
var x = point.x, y = point.y;
return (react_1.default.createElement("g", null,
react_1.default.createElement("text", { x: x, y: y, fontFamily: fontFamily || "Verdana", fontSize: fontSize || 10 }, text)));
};
exports.default = SparklinesText;
//# sourceMappingURL=SparklinesText.js.map