Files
dancefinder-app/layouts/components/themed.vue
T

22 lines
364 B
Vue
Raw Normal View History

<template>
<div>
<slot />
</div>
</template>
<script>
import { getCurrentInstance } from 'vue'
2023-08-01 20:21:31 +02:00
import { useState } from '~/store'
export default {
name: 'ThemedLayout',
setup() {
const instance = getCurrentInstance()
2023-08-01 20:21:31 +02:00
const state = useState()
if (instance) {
2023-08-01 20:21:31 +02:00
instance.proxy.$vuetify.theme.dark = state.darkMode
}
}
}
</script>