UNPKG

@netdata/charts

Version:

Netdata frontend SDK and chart utilities

33 lines 961 B
import React from "react"; import { TextSmall, Flex } from "@netdata/netdata-ui"; import { useAttributeValue } from "../provider"; import Row from "./row"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; var Info = function Info(_ref) { var title = _ref.title, children = _ref.children; return /*#__PURE__*/_jsxs(Flex, { gap: 2, children: [/*#__PURE__*/_jsx(TextSmall, { color: "textDescription", children: title }), /*#__PURE__*/_jsx(Flex, { as: TextSmall, background: "elementBackground", children: children })] }); }; var Context = function Context() { var contextScope = useAttributeValue("contextScope"); return /*#__PURE__*/_jsx(Row, { title: "Plugin and chart context", color: "key", "data-testid": "chartDetails-context", children: /*#__PURE__*/_jsx(Info, { title: "Context", children: contextScope.join(", ") }) }); }; export default Context;