feat: theme toggle component removal

This commit is contained in:
Alisa | Side.one 2023-05-05 15:13:42 +08:00
parent 02cc6ee176
commit af4eafc3b1

View File

@ -1,6 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { useThemeConfig } from '@core/composable/useThemeConfig'; import { useThemeConfig } from '@core/composable/useThemeConfig';
import type { ThemeSwitcherTheme } from '@layouts/types'; import type { ThemeSwitcherTheme } from '@layouts/types';
import { Icon } from '@iconify/vue';
import { onMounted, watch } from 'vue'; import { onMounted, watch } from 'vue';
const props = defineProps<{ const props = defineProps<{
@ -50,10 +51,12 @@ onMounted(() => {
</script> </script>
<template> <template>
<IconBtn @click="changeTheme"> <div class="tooltip tooltip-bottom delay-1000" :data-tip="currentThemeName">
<VIcon :icon="props.themes[currentThemeIndex].icon" /> <button
<VTooltip activator="parent" open-delay="1000"> class="btn btn-ghost btn-circle btn-sm mx-1"
<span class="text-capitalize">{{ currentThemeName }}</span> @click="changeTheme"
</VTooltip> >
</IconBtn> <Icon :icon="props.themes[currentThemeIndex].icon" class="text-2xl" />
</button>
</div>
</template> </template>