geostyler
Version:
Framework for styling geodata
45 lines (44 loc) • 952 B
JavaScript
import { jsxs as m, jsx as r } from "react/jsx-runtime";
import { useCallback as t } from "react";
import { BooleanExpressionInput as e } from "../../ExpressionInput/BooleanExpressionInput/BooleanExpressionInput.js";
/* empty css */
import { UnknownInput as f } from "../UnknownInput/UnknownInput.js";
const j = ({
value: o,
onChange: s,
type: p
}) => {
const c = t((n) => {
s({
...o,
case: n
});
}, [o, s]), i = t((n) => {
s({
...o,
value: n
});
}, [o, s]);
return /* @__PURE__ */ m("div", { className: "gs-case-input", children: [
/* @__PURE__ */ r(
e,
{
onChange: c,
onCancel: () => s(void 0),
value: o == null ? void 0 : o.case
}
),
/* @__PURE__ */ r(
f,
{
forcedType: p,
onChange: i,
value: o == null ? void 0 : o.value
}
)
] });
};
export {
j as CaseInput,
j as default
};