You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
488 B

<template>
<button class="theme-toggle" @click="toggleTheme" :aria-label="TEXTS.THEME.TOGGLE_LABEL">
<span v-if="isDark" class="theme-icon">🌞</span>
<span v-else class="theme-icon">🌙</span>
</button>
</template>
<script setup lang="ts">
import { TEXTS } from '../config/content';
const props = defineProps({'isDark': {type: Boolean, default: true},'toggleTheme': {type: Function}});
</script>
<style scoped>
@import '~/assets/css/components/theme-toggle.css';
</style>