geostyler
Version:
Framework for styling geodata
58 lines (57 loc) • 1.4 kB
JavaScript
import { jsx as i, jsxs as d } from "react/jsx-runtime";
import { Switch as f, Button as u } from "antd";
import { FunctionUI as a } from "../../FunctionUI/FunctionUI.js";
import { isGeoStylerFunction as x } from "geostyler-style";
import { FunctionOutlined as k } from "@ant-design/icons";
/* empty css */
const N = ({
onChange: r,
onCancel: s,
value: t,
labelOn: c,
labelOff: n,
className: e,
switchProps: p,
functionUiProps: l
}) => {
let o = "boolean-expression-input";
return e && (o += ` ${e}`), x(t) ? /* @__PURE__ */ i("span", { className: o, children: /* @__PURE__ */ i(
a,
{
type: "boolean",
value: t,
...l,
onChange: r,
onCancel: () => s("boolean")
}
) }) : /* @__PURE__ */ d("span", { className: o, children: [
/* @__PURE__ */ i(
f,
{
checked: t,
onChange: (m) => {
r == null || r(m);
},
checkedChildren: /* @__PURE__ */ i("span", { children: c }),
unCheckedChildren: /* @__PURE__ */ i("span", { children: n }),
...p
}
),
/* @__PURE__ */ i(
u,
{
icon: /* @__PURE__ */ i(k, {}),
onClick: () => {
r == null || r({
name: "property",
args: [""]
});
}
}
)
] });
};
export {
N as BooleanExpressionInput,
N as default
};