diff --git a/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue b/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue index 400de16c..e6b10a8c 100644 --- a/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue +++ b/components/content/docs/getting-started/dark-mode/DarkModeForNuxt.vue @@ -8,7 +8,11 @@ import { NuxtModuleAddCode, nuxtThemeSwitcherCode, } from "./darkModeCodes"; -import ThemeSwitcherForDoc from "./ThemeSwitcherForDoc.vue"; +const colorMode = useColorMode(); + +const toggleTheme = () => { + colorMode.preference = colorMode.preference === "dark" ? "light" : "dark"; +};