Files
speckle-server/packages/frontend-2/components/header/ThemeToggle.vue
T
Kristaps Fabians Geikins 6af6c656a4 feat(fe2): app authorization workflow redesign [WBX-217] (#2044)
* WIP

* new permissions table

* permissions grouped

* updated scope descriptions

* more scope copy adjustments

* allow auth error handling

* manually closable toast notification

* fixed mentions rendering

* error view

* not you? feature

* cleanup

* minor styling changes

* WIP table

* finished authorized apps table

* minor cleanup

* cleaning up comment

* testing changes
2024-02-23 16:50:07 +02:00

18 lines
681 B
Vue

<template>
<button
type="button"
class="rounded-full h-8 w-8 bg-foreground text-foundation hover:text-primary flex justify-center items-center ring-offset-foundation focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 transition"
@click="toggleTheme"
>
<span class="sr-only">Toggle dark mode</span>
<Icon class="h-4 w-4" aria-hidden="true" />
</button>
</template>
<script setup lang="ts">
import { SunIcon, MoonIcon } from '@heroicons/vue/24/solid'
import { useTheme } from '~~/lib/core/composables/theme'
const { isDarkTheme, toggleTheme } = useTheme()
const Icon = computed(() => (isDarkTheme.value ? SunIcon : MoonIcon))
</script>