geostyler
Version:
Framework for styling geodata
42 lines (41 loc) • 1.05 kB
JavaScript
import { jsxs as s, jsx as t } from "react/jsx-runtime";
import { Select as u, Button as c } from "antd";
import { useGeoStylerLocale as p } from "../../../context/GeoStylerContext/GeoStylerContext.js";
import { functionConfigs as f } from "../functionConfigs.js";
import { NodeCollapseOutlined as d } from "@ant-design/icons";
/* empty css */
const k = ({
value: n,
onChange: m,
onCancel: r,
type: e,
size: l
}) => {
const i = p("FunctionNameCombo"), a = f.filter((o) => e ? o.type === e || o.type === "unknown" : !0).map((o) => ({
value: o.name,
label: o.name
}));
return /* @__PURE__ */ s("div", { className: "gs-function-name-combo", children: [
/* @__PURE__ */ t(
u,
{
value: n,
onChange: m,
placeholder: i.placeholder,
size: l,
options: a
}
),
r && /* @__PURE__ */ t(
c,
{
icon: /* @__PURE__ */ t(d, {}),
onClick: () => r(e)
}
)
] });
};
export {
k as FunctionNameCombo,
k as default
};