Skip to content

Commit 8ac7b63

Browse files
committed
Close theme toggle upon selecting a theme
1 parent b403339 commit 8ac7b63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/stubs/presets/theme_toggle/theme_toggle.antlers.html.stub

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,17 @@
8686
preferredColorScheme: window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light',
8787
themeColor: {{ theme_color ?? 'false' }},
8888
themeLight: function() {
89+
this.themeToggleOpen = false
8990
this.$store.theme.set('light')
9091
this.setLightTheme()
9192
},
9293
themeDark: function() {
94+
this.themeToggleOpen = false
9395
this.$store.theme.set('dark')
9496
this.setDarkTheme()
9597
},
9698
themeSystem: function() {
99+
this.themeToggleOpen = false
97100
this.$store.theme.set('system')
98101
window.matchMedia('(prefers-color-scheme: light)').matches && this.setLightTheme()
99102
window.matchMedia('(prefers-color-scheme: dark)').matches && this.setDarkTheme()

0 commit comments

Comments
 (0)