UNPKG

@grafana/ui

Version:
27 lines (24 loc) 684 B
import { css } from '@emotion/css'; import '../../geo/index.mjs'; import { useOpenLayersContext } from '../../geo/OpenLayersContext.mjs'; import { isGeometry } from '../../geo/utils.mjs'; "use strict"; function GeoCell({ value }) { const { formatGeometry } = useOpenLayersContext(); let disp = null; if (formatGeometry && isGeometry(value)) { disp = formatGeometry(value); } else if (value != null) { disp = `${value}`; } return disp; } const styles = css({ fontFamily: "monospace", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }); const getStyles = () => styles; export { GeoCell, getStyles }; //# sourceMappingURL=GeoCell.mjs.map