Skip to content

Commit 2785fa6

Browse files
authored
fix: dark mode compatibility with vite-inspect (#501)
1 parent 25bba74 commit 2785fa6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/devtools-ui-kit/src/components/NDarkToggle.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<script setup lang="ts">
22
import { computed, nextTick } from 'vue'
3-
import { useColorMode } from '#imports'
3+
4+
import { useColorMode } from '@vueuse/core'
45
56
const mode = useColorMode()
67
const isDark = computed<boolean>({
78
get() {
89
return mode.value === 'dark'
910
},
1011
set() {
11-
mode.preference = isDark.value ? 'light' : 'dark'
12+
mode.value = isDark.value ? 'light' : 'dark'
1213
},
1314
})
1415

0 commit comments

Comments
 (0)