Move into app/

This commit is contained in:
2025-10-07 13:52:57 +07:00
parent 6dd7d33661
commit 36f5508d48
95 changed files with 28 additions and 19 deletions
+21
View File
@@ -0,0 +1,21 @@
<script setup>
const colorMode = useColorMode()
const isDark = computed({
get() {
return colorMode.value === 'dark'
},
set() {
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
}
})
</script>
<template>
<ClientOnly v-if="!colorMode?.forced">
<button @click="isDark = !isDark" class="btn btn-sm btn-neutral">Toggle Theme</button>
<template #fallback>
<button class="btn btn-sm btn-neutral">Loading...</button>
</template>
</ClientOnly>
</template>