UNPKG

@grafana/ui

Version:
21 lines (18 loc) 781 B
import { jsx } from 'react/jsx-runtime'; import '../geo/index.mjs'; import { useOpenLayersContext } from '../geo/OpenLayersContext.mjs'; import { isGeometry } from '../geo/utils.mjs'; "use strict"; function GeoCell(props) { const { cell, tableStyles, cellProps } = props; const { formatGeometry } = useOpenLayersContext(); let disp = ""; if (formatGeometry && isGeometry(cell.value)) { disp = formatGeometry(cell.value); } else if (cell.value != null) { disp = `${cell.value}`; } return /* @__PURE__ */ jsx("div", { ...cellProps, className: tableStyles.cellContainer, children: /* @__PURE__ */ jsx("div", { className: tableStyles.cellText, style: { fontFamily: "monospace" }, children: disp }) }); } export { GeoCell }; //# sourceMappingURL=GeoCell.mjs.map