diff --git a/src/composables/useTheme.ts b/src/composables/useTheme.ts index 87fc2a1..828dad3 100644 --- a/src/composables/useTheme.ts +++ b/src/composables/useTheme.ts @@ -1,4 +1,4 @@ -import { ref } from 'vue' +import { ref, reactive } from 'vue' const STORAGE_KEY = 'mach-theme' const isDark = ref(false) @@ -29,8 +29,8 @@ export function initTheme(): void { export function useTheme() { initTheme() - return { + return reactive({ isDark, toggle: () => applyTheme(!isDark.value) - } + }) } \ No newline at end of file