UNPKG

@grafana/ui

Version:
41 lines (36 loc) 1.24 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var jsxRuntime = require('react/jsx-runtime'); var css = require('@emotion/css'); "use strict"; const FooterCell = (props) => { const cell = css.css({ width: "100%", listStyle: "none" }); const list = css.css({ width: "100%", display: "flex", flexDirection: "row", justifyContent: "space-between" }); if (props.value && !Array.isArray(props.value)) { return /* @__PURE__ */ jsxRuntime.jsx("span", { children: props.value }); } if (props.value && Array.isArray(props.value) && props.value.length > 0) { return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cell, children: props.value.map((v, i) => { const key = Object.keys(v)[0]; return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: list, children: [ /* @__PURE__ */ jsxRuntime.jsx("span", { children: key }), /* @__PURE__ */ jsxRuntime.jsx("span", { children: v[key] }) ] }, i); }) }); } return EmptyCell; }; const EmptyCell = () => { return /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\xA0" }); }; exports.EmptyCell = EmptyCell; exports.FooterCell = FooterCell; //# sourceMappingURL=FooterCell.cjs.map