tui: simplify theme selection API by renaming setSelectedTheme to set

This commit is contained in:
Dax Raad
2025-10-31 18:11:36 -04:00
parent 7a926b32ce
commit 3823d8d50e
3 changed files with 33 additions and 17 deletions

View File

@@ -642,10 +642,11 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
return values()[prop]
},
}),
get selectedTheme() {
get selected() {
return kv.data.theme
},
setSelectedTheme(theme: string) {
set(theme: string) {
if (!THEMES[theme]) return
setTheme(theme)
kv.set("theme", theme)
},