UNPKG

@dfnivo/sankey

Version:

<a href="https://nivo.rocks"><img alt="nivo" src="https://raw.githubusercontent.com/plouc/nivo/master/nivo.png" width="216" height="68"/></a>

55 lines (54 loc) 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "SankeyLinkTooltip", { enumerable: true, get: function() { return SankeyLinkTooltip; } }); var _jsxRuntime = require("react/jsx-runtime"); var _tooltip = require("@dfnivo/tooltip"); var tooltipStyles = { container: { display: "flex", alignItems: "center" }, sourceChip: { marginRight: 7 }, targetChip: { marginLeft: 7, marginRight: 7 } }; var SankeyLinkTooltip = function(param) { var link = param.link; return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tooltip.BasicTooltip, { id: /*#__PURE__*/ (0, _jsxRuntime.jsxs)("span", { style: tooltipStyles.container, children: [ /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tooltip.Chip, { color: link.source.color, style: tooltipStyles.sourceChip }), /*#__PURE__*/ (0, _jsxRuntime.jsx)("strong", { children: link.source.label }), " > ", /*#__PURE__*/ (0, _jsxRuntime.jsx)("strong", { children: link.target.label }), /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tooltip.Chip, { color: link.target.color, style: tooltipStyles.targetChip }), /*#__PURE__*/ (0, _jsxRuntime.jsx)("strong", { children: link.formattedValue }) ] }) }); }; //# sourceMappingURL=SankeyLinkTooltip.js.map