generated from autonomic-cooperative/astro-payload-template
Add vanilla theme switcher
This commit is contained in:
12
astro/src/components/ThemeSwitcher.astro
Normal file
12
astro/src/components/ThemeSwitcher.astro
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
---
|
||||
<select id="theme-selector">
|
||||
<option value="autonomic">Autonomic</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="dark">Dark</option>
|
||||
</select>
|
||||
|
||||
<script>
|
||||
import { handleThemeChange, switchTheme, initializeThemeSelector } from "@/utils/theme"
|
||||
initializeThemeSelector()
|
||||
</script>
|
Reference in New Issue
Block a user