geostyler
Version:
Framework for styling geodata
34 lines (33 loc) • 769 B
JavaScript
import { jsx as a } from "react/jsx-runtime";
import { useGeoStylerLocale as p } from "../../../../context/GeoStylerContext/GeoStylerContext.js";
import { StringExpressionSelect as c } from "../../../ExpressionInput/StringExpressionSelect/StringExpressionSelect.js";
const f = ({
onChange: o,
value: i,
capOptions: l = ["butt", "round", "square"],
...n
}) => {
const t = p("LineCapField"), r = l.map((e) => ({
label: t.lineCapOptions[e],
value: e
}));
function s() {
o(void 0);
}
return /* @__PURE__ */ a(
c,
{
className: "editor-field line-cap-field",
value: i,
onChange: (e) => o(e),
onCancel: s,
selectProps: {
...n,
options: r
}
}
);
};
export {
f as LineCapField
};