mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-18 15:00:52 +01:00
21 lines
479 B
Vue
21 lines
479 B
Vue
<template>
|
|
<UDropdownMenu :items>
|
|
<UButton :icon="currentTheme?.icon" />
|
|
</UDropdownMenu>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { DropdownMenuItem } from '@nuxt/ui'
|
|
|
|
const { availableThemes, currentTheme } = storeToRefs(useUiStore())
|
|
|
|
const emit = defineEmits<{ select: [string] }>()
|
|
|
|
const items = computed<DropdownMenuItem[]>(() =>
|
|
availableThemes?.value.map((theme) => ({
|
|
...theme,
|
|
onSelect: () => emit('select', theme.value),
|
|
})),
|
|
)
|
|
</script>
|