Move color theme toggle button into a separate component

This commit is contained in:
2026-05-17 15:24:53 +02:00
parent c7fd0fe132
commit 170f188435
3 changed files with 35 additions and 7 deletions
-1
View File
@@ -21,7 +21,6 @@ import { ref, provide, watch } from 'vue';
const isDark = ref(localStorage.getItem('theme') === 'dark');
provide('isDark', isDark);
watch(isDark, val => localStorage.setItem('theme', val ? 'dark' : 'light'));
</script>
<template>