Docs Updated
This commit is contained in:
@@ -15,7 +15,12 @@ export const Swap = (props) => {
|
||||
return $html("label", { ...rest, class: ui('swap', className) }, [
|
||||
$html("input", {
|
||||
type: "checkbox",
|
||||
checked: val(value)
|
||||
checked: () => val(value), // ← FUNCIÓN: se reevalúa cuando la señal cambia
|
||||
onclick: (e) => {
|
||||
if (typeof value === "function") {
|
||||
value(e.target.checked);
|
||||
}
|
||||
}
|
||||
}),
|
||||
$html("div", { class: "swap-on" }, on),
|
||||
$html("div", { class: "swap-off" }, off),
|
||||
|
||||
Reference in New Issue
Block a user