UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

72 lines (64 loc) 2.27 kB
import {PickerControl as $1c0e7fb0f1cf36ed$export$e587c41f8a2e48c5} from "./column-components.52f88505.js"; import {Component as $lpx6O$Component} from "react"; import {Slider as $lpx6O$Slider} from "@blueprintjs/core"; import $lpx6O$macrostrathyper from "@macrostrat/hyper"; const $8c47b2018955078b$var$surfaceTypes = [ { value: "mfs", label: "Maximum flooding surface" }, { value: "sb", label: "Sequence boundary" } ]; function $8c47b2018955078b$export$877eb4bd7a9ed8de(props) { const { interval: interval, onChange: onChange } = props; //if not interval.surface_type? // return h 'p', 'Please set an surface type to access orders' let val = interval.surface_order; if (val == null) val = 5; return (0, $lpx6O$macrostrathyper)((0, $lpx6O$Slider), { min: 0, max: 5, disabled: interval.surface_type == null, stepSize: 1, showTrackFill: false, value: val, onChange: (surface_order)=>{ if (interval.surface_type == null) return; return onChange({ surface_order: surface_order }); } }); } function $8c47b2018955078b$export$8c0a904f1bf224ec(props) { return (0, $lpx6O$macrostrathyper)((0, $1c0e7fb0f1cf36ed$export$e587c41f8a2e48c5), { vertical: false, isNullable: true, ...props }); } class $8c47b2018955078b$export$9e0d3e5b8bc67825 extends (0, $lpx6O$Component) { render() { const { interval: interval, onUpdate: onUpdate } = this.props; const states = [ { label: "Abrupt", value: true }, { label: "Diffuse", value: false } ]; return (0, $lpx6O$macrostrathyper)($8c47b2018955078b$export$8c0a904f1bf224ec, { states: states, activeState: interval.definite_boundary, onUpdate: onUpdate }); } } export {$8c47b2018955078b$export$877eb4bd7a9ed8de as SurfaceOrderSlider, $8c47b2018955078b$export$8c0a904f1bf224ec as HorizontalPicker, $8c47b2018955078b$export$9e0d3e5b8bc67825 as BoundaryStyleControl}; //# sourceMappingURL=column-components.1da6897e.js.map