@coko/client
Version:
Client side common code for coko apps
35 lines (33 loc) • 903 B
JavaScript
import { grid as e } from "../../toolkit/themeHelper.js";
import "../../toolkit/index.js";
import "react";
import t, { css as n } from "styled-components";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
import { Switch as a } from "antd";
//#region src/ui/common/Switch.tsx
var o = t.span``, s = t.span`
${(t) => t.$labelPosition === "left" && n`
margin-right: ${e(2)};
`}
${(t) => t.$labelPosition === "right" && n`
margin-left: ${e(2)};
`}
`, c = (e) => {
let { className: t, label: n = null, labelPosition: c = "right", ...l } = e;
return /* @__PURE__ */ i(o, {
className: t,
children: [
n && c === "left" && /* @__PURE__ */ r(s, {
$labelPosition: c,
children: n
}),
/* @__PURE__ */ r(a, { ...l }),
n && c === "right" && /* @__PURE__ */ r(s, {
$labelPosition: c,
children: n
})
]
});
};
//#endregion
export { c as default };