@@ -1,2 +1,5 @@
shamefully-hoist=true
strict-peer-dependencies=false
+
+auto-install-peers=true
+strict-peer-dependencies=false
@@ -7,10 +7,13 @@ export function useTheme() {
function toggleTheme() {
const _theme = theme.value === "dark" ? "light" : "dark";
- mode.value = _theme;
theme.value = _theme;
}
+ watch(() => theme.value, newVal => mode.value = newVal, {
+ immediate: true,
+ });
const isDarkTheme = computed(() => theme.value === "dark");
return {