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,5 +1,5 @@
|
||||
// components/Swap.js
|
||||
import { Tag } from "sigpro";
|
||||
import { h } from "sigpro";
|
||||
import { ui, val } from "../utils.js";
|
||||
|
||||
/**
|
||||
@@ -12,8 +12,8 @@ import { ui, val } from "../utils.js";
|
||||
export const Swap = (props) => {
|
||||
const { class: className, value, on, off, ...rest } = props;
|
||||
|
||||
return Tag("label", { ...rest, class: ui('swap', className) }, [
|
||||
Tag("input", {
|
||||
return h("label", { ...rest, class: ui('swap', className) }, [
|
||||
h("input", {
|
||||
type: "checkbox",
|
||||
checked: () => val(value),
|
||||
onclick: (e) => {
|
||||
@@ -22,7 +22,7 @@ export const Swap = (props) => {
|
||||
}
|
||||
}
|
||||
}),
|
||||
Tag("div", { class: "swap-on" }, on),
|
||||
Tag("div", { class: "swap-off" }, off),
|
||||
h("div", { class: "swap-on" }, on),
|
||||
h("div", { class: "swap-off" }, off),
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user