weifuwu 0.27.18 → 0.27.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/weifuwu-ui.js +7 -2
- package/package.json +1 -1
package/dist/weifuwu-ui.js
CHANGED
|
@@ -757,8 +757,13 @@
|
|
|
757
757
|
// Toggle all [wu-theme] buttons: dark ↔ light
|
|
758
758
|
document.querySelectorAll('[wu-theme]').forEach((b) => {
|
|
759
759
|
const v = b.getAttribute('wu-theme')
|
|
760
|
-
if (v === 'dark')
|
|
761
|
-
|
|
760
|
+
if (v === 'dark') {
|
|
761
|
+
b.setAttribute('wu-theme', 'light')
|
|
762
|
+
b.textContent = '☀️'
|
|
763
|
+
} else if (v === 'light') {
|
|
764
|
+
b.setAttribute('wu-theme', 'dark')
|
|
765
|
+
b.textContent = '🌙'
|
|
766
|
+
}
|
|
762
767
|
})
|
|
763
768
|
})
|
|
764
769
|
|