Before repair nav components
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 4s
This commit is contained in:
14
components/discarted/swap.js
Normal file
14
components/discarted/swap.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// components/Swap.js
|
||||
import { h } from "sigpro";
|
||||
|
||||
export const Swap = (props) => {
|
||||
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)
|
||||
}),
|
||||
h("div", { class: "swap-on" }, props.on),
|
||||
h("div", { class: "swap-off" }, props.off)
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user