🐛 Fix colorscheme
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { useDark, useToggle } from "@vueuse/core"
|
||||
|
||||
// composables/useCustomTheme.ts
|
||||
export function useCustomTheme(): {
|
||||
isDark: WritableComputedRef<boolean, boolean>
|
||||
toggle: (value?: boolean | undefined) => boolean,
|
||||
} {
|
||||
const { $vuetify } = useNuxtApp()
|
||||
|
||||
const isDark = useDark({
|
||||
valueDark: "dark",
|
||||
valueLight: "light",
|
||||
initialValue: "light",
|
||||
onChanged: (dark: boolean) => {
|
||||
$vuetify.theme.change(dark ? "dark" : "light")
|
||||
}
|
||||
})
|
||||
|
||||
const toggle = useToggle(isDark)
|
||||
|
||||
return { isDark, toggle }
|
||||
}
|
Reference in New Issue
Block a user