geostyler
Version:
Framework for styling geodata
52 lines (51 loc) • 1.15 kB
JavaScript
import { jsx as o } from "react/jsx-runtime";
import { Select as l } from "antd";
import p from "lodash-es/get.js";
import { useGeoStylerLocale as m, useGeoStylerComposition as h } from "../../../../context/GeoStylerContext/GeoStylerContext.js";
const w = l.Option, f = ({
onChange: s,
value: n = "circle",
wellKnownNames: t = [
"circle",
"square",
"triangle",
"star",
"cross",
"x",
"shape://backslash",
"shape://carrow",
"shape://dot",
"shape://horline",
"shape://oarrow",
"shape://plus",
"shape://slash",
"shape://times",
"shape://vertline"
]
}) => {
const r = m("WellKnownNameField"), {
wellKnownNames: a
} = h("WellKnownNamesField"), i = a ?? t;
return /* @__PURE__ */ o(
l,
{
className: "editor-field wellknownname-field",
value: n,
onChange: s,
children: i.map((e) => {
const c = p(r, "wellKnownNames[" + e + "]") || e;
return /* @__PURE__ */ o(
w,
{
value: e,
children: c
},
e
);
})
}
);
};
export {
f as WellKnownNameField
};