GHHG10/CodeServer / opencode /packages /tui /src /component /dialog-variant.tsx
GHHG10's picture
download
raw
896 Bytes
import { createMemo } from "solid-js"
import { useLocal } from "../context/local"
import { DialogSelect } from "../ui/dialog-select"
import { useDialog } from "../ui/dialog"
export function DialogVariant() {
const local = useLocal()
const dialog = useDialog()
const options = createMemo(() => {
return [
{
value: "default",
title: "Default",
onSelect: () => {
dialog.clear()
local.model.variant.set(undefined)
},
},
...local.model.variant.list().map((variant) => ({
value: variant,
title: variant,
onSelect: () => {
dialog.clear()
local.model.variant.set(variant)
},
})),
]
})
return (
<DialogSelect<string>
options={options()}
title={"Select variant"}
current={local.model.variant.selected()}
flat={true}
/>
)
}

Xet Storage Details

Size:
896 Bytes
·
Xet hash:
b0e35f9004287c30cf6e123ba3312515bb9c7ac6b305ca37e178dc387daf66cf

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.