mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: remove unused dialog-theme component
This commit is contained in:
parent
0de2299236
commit
8a1bf80db8
1 changed files with 0 additions and 44 deletions
|
|
@ -1,44 +0,0 @@
|
|||
import { useTheme } from "../context/theme"
|
||||
import { DialogSelect } from "../ui/dialog-select"
|
||||
import { useDialog } from "../ui/dialog"
|
||||
|
||||
export function DialogTheme() {
|
||||
const { mode, setMode } = useTheme()
|
||||
const dialog = useDialog()
|
||||
|
||||
const options = () => [
|
||||
{
|
||||
key: "dark",
|
||||
value: "dark",
|
||||
title: "Dark",
|
||||
description: "Use dark theme",
|
||||
category: "Theme",
|
||||
},
|
||||
{
|
||||
key: "light",
|
||||
value: "light",
|
||||
title: "Light",
|
||||
description: "Use light theme",
|
||||
category: "Theme",
|
||||
},
|
||||
{
|
||||
key: "auto",
|
||||
value: "auto",
|
||||
title: "Auto",
|
||||
description: "Automatically switch based on system preference",
|
||||
category: "Theme",
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
<DialogSelect
|
||||
title="Select Theme"
|
||||
current={mode()}
|
||||
options={options()}
|
||||
onSelect={(option) => {
|
||||
setMode(option.value as "dark" | "light" | "auto")
|
||||
dialog.clear()
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue