// 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) ]); };