Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { DialogSelect, type DialogSelectRef } from "../ui/dialog-select"
import { THEMES, useTheme } from "../context/theme"
import { useDialog } from "../ui/dialog"
import { onCleanup, onMount } from "solid-js"
import { createMemo, onCleanup, onMount } from "solid-js"

export function DialogThemeList() {
const theme = useTheme()
const options = Object.keys(THEMES).map((value) => ({
title: value,
value: value as keyof typeof THEMES,
}))
const options = createMemo(() => {
return Object.keys(theme.all).map((value) => ({
title: value,
value: value as keyof typeof THEMES,
}))
})
const dialog = useDialog()
let confirmed = false
let ref: DialogSelectRef<keyof typeof THEMES>
Expand All @@ -27,7 +29,7 @@ export function DialogThemeList() {
return (
<DialogSelect
title="Themes"
options={options}
options={options()}
onMove={(opt) => {
theme.set(opt.value)
}}
Expand Down
Loading