UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

43 lines (42 loc) 1.69 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const main_module = require("./main.module.scss.cjs"); const d3Format = require("d3-format"); const Select = require("react-select"); const _interopDefault = (e) => e && e.__esModule ? e : { default: e }; const Select__default = /* @__PURE__ */ _interopDefault(Select); const LabeledControl = function(props) { const { title, children, ...rest } = props; delete rest.is; return main_module.default("div.labeled-control", [ main_module.default("label.bp3-label", null, [ main_module.default.if(title != null)("span.label-text", null, title) ]), props.is != null ? main_module.default(props.is, rest) : null ]); }; const menuStyles = (provided) => ({ ...provided, zIndex: 999 }); const RaisedSelect = (props) => main_module.default(Select__default.default, { styles: { menu: menuStyles }, ...props }); const IntervalEditorTitle = function(props) { let { showID, title, interval, heightFormat } = props; const { id, top, bottom } = interval; let fmt = (v) => v; if (heightFormat != null) { fmt = d3Format.format(heightFormat); } if (showID == null) { showID = true; } return main_module.default("div.editor-dialog-title.editor-title", [ main_module.default("h3.title-center", title), main_module.default("h4.height-range", `${fmt(bottom)}${fmt(top)} m`), main_module.default("h4.id", null, ["ID: ", main_module.default.if(id != null && showID)("code", id)]) ]); }; exports.IntervalEditorTitle = IntervalEditorTitle; exports.LabeledControl = LabeledControl; exports.RaisedSelect = RaisedSelect; //# sourceMappingURL=util.cjs.map