Rebuild all components
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s

This commit is contained in:
2026-04-21 18:00:17 +02:00
parent d900659d88
commit 16afea2768
67 changed files with 1820 additions and 2132 deletions

View File

@@ -2,20 +2,13 @@
import { Tag } from "sigpro";
export const Swap = (props) => {
const { class: className, value, on, off, ...rest } = props;
return Tag("label", {
...rest,
class: `swap ${className || ''}`.trim()
}, [
return Tag("label", { ...props, class: `swap ${props.class ?? ''}` }, [
Tag("input", {
type: "checkbox",
checked: () => typeof value === "function" ? value() : value,
onchange: (e) => {
if (typeof value === "function") value(e.target.checked);
}
checked: () => typeof props.value === "function" ? props.value() : props.value,
onchange: (e) => typeof props.value === "function" && props.value(e.target.checked)
}),
Tag("div", { class: "swap-on" }, on),
Tag("div", { class: "swap-off" }, off)
Tag("div", { class: "swap-on" }, props.on),
Tag("div", { class: "swap-off" }, props.off)
]);
};