Move to appConfig, Vuetify 3

This commit is contained in:
2024-01-27 19:17:30 +03:00
parent 4ac1fd9574
commit 1f7c8f0ed4
29 changed files with 1329 additions and 1323 deletions
+18
View File
@@ -0,0 +1,18 @@
import { useDark, useToggle } from '@vueuse/core'
export function useCustomTheme() {
const { $vuetify } = useNuxtApp()
const isDark = useDark({
valueDark: 'dark',
valueLight: 'light',
initialValue: 'light',
onChanged: (dark: boolean) => {
$vuetify.theme.global.name.value = dark ? 'dark' : 'light'
},
})
const toggle = useToggle(isDark)
return { isDark, toggle }
}