UNPKG

geostyler

Version:
48 lines (47 loc) 1.01 kB
import { jsxs as c, jsx as t } from "react/jsx-runtime"; import { useCallback as p } from "react"; /* empty css */ import { NumberExpressionInput as d } from "../../ExpressionInput/NumberExpressionInput/NumberExpressionInput.js"; import { UnknownInput as f } from "../UnknownInput/UnknownInput.js"; const I = ({ value: o, onChange: r, type: s }) => { const i = p((n) => { r({ ...o, boundary: n }); }, [o, r]), m = p((n) => { r({ ...o, value: n }); }, [o, r]); return /* @__PURE__ */ c("div", { className: "gs-step-input", children: [ /* @__PURE__ */ t( d, { onChange: i, onCancel: () => r(void 0), value: o == null ? void 0 : o.boundary, inputProps: { prefix: ">" } } ), /* @__PURE__ */ t( f, { forcedType: s, onChange: m, value: o == null ? void 0 : o.value } ) ] }); }; export { I as StepInput, I as default };