extractify.zip/plugins/vuetify.ts
2023-06-06 03:59:48 +03:00
Ask

19 lines
476 B
TypeScript

{5a3b57d4c1e2abb50c5ca3ce88957e4fa5c68a6d true 476 vuetify.ts 0xc002aa24d0}

import { createVuetify } from 'vuetify'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
export default defineNuxtPlugin(nuxtApp => {
// get system dark mode
const darkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
const vuetify = createVuetify({
ssr: false,
components,
directives,
theme: {
defaultTheme: darkMode ? 'dark' : 'light',
}
})
nuxtApp.vueApp.use(vuetify)
})