Skip to content

Commit

Permalink
Persist dark mode toggle state
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Dec 3, 2024
1 parent 30d56dc commit f42364d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const isDarkModeEnabled = ref(
function toggleDarkMode() {
document.documentElement.classList.toggle(darkModeClass);
isDarkModeEnabled.value = !isDarkModeEnabled.value;
localStorage.setItem(darkModeClass, isDarkModeEnabled.value.toString());
}
</script>

Expand Down

0 comments on commit f42364d

Please sign in to comment.