generated from Seekra/repository-template
Move color theme toggle button into a separate component
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user