changed to new functions
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
// components/Swap.js
|
||||
import { Tag } from "sigpro";
|
||||
import { h } from "sigpro";
|
||||
|
||||
export const Swap = (props) => {
|
||||
return Tag("label", { ...props, class: `swap ${props.class ?? ''}` }, [
|
||||
Tag("input", {
|
||||
return h("label", { ...props, class: `swap ${props.class ?? ''}` }, [
|
||||
h("input", {
|
||||
type: "checkbox",
|
||||
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" }, props.on),
|
||||
Tag("div", { class: "swap-off" }, props.off)
|
||||
h("div", { class: "swap-on" }, props.on),
|
||||
h("div", { class: "swap-off" }, props.off)
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user