Skip to content

Commit 6bb5261

Browse files
authored
Update ultra.js
Added switch support
1 parent 0f3207f commit 6bb5261

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dist/ultra.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,16 @@ const Ultra = {
135135
modal.appendChild(closeBtn);
136136
modalOverlay.appendChild(modal);
137137
document.body.appendChild(modalOverlay);
138+
},
139+
140+
switch: {
141+
state(el) {
142+
return el?.checked === true
143+
},
144+
toggle(el) {
145+
if (el) {
146+
el.checked = !el.checked;
147+
}
148+
}
138149
}
139150
};

0 commit comments

Comments
 (0)