Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/hanko-demo.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829<script setup>const colorMode = useColorMode()
const isDark = computed({ get () { return colorMode.value === 'dark' }, set () { colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark' }})</script>
<template> <ClientOnly> <UButton :icon="isDark ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid'" color="gray" variant="ghost" aria-label="Theme" @click="isDark = !isDark" />
<template #fallback> <div class="w-8 h-8" /> </template> </ClientOnly></template>