geostyler
Version:
Framework for styling geodata
34 lines (33 loc) • 787 B
JavaScript
import { jsx as s } from "react/jsx-runtime";
import { StringExpressionSelect as a } from "../../../ExpressionInput/StringExpressionSelect/StringExpressionSelect.js";
import { useGeoStylerLocale as m } from "../../../../context/GeoStylerContext/GeoStylerContext.js";
const u = ({
onChange: o,
value: l,
placementOptions: t = ["point", "line", "line-center"],
...n
}) => {
const i = m("PlacementField"), r = t.map((e) => ({
label: i.placementOptions[e],
value: e
}));
function c() {
o(void 0);
}
return /* @__PURE__ */ s(
a,
{
className: "editor-field placement-field",
value: l,
onChange: (e) => o(e),
onCancel: c,
selectProps: {
...n,
options: r
}
}
);
};
export {
u as PlacementField
};