feat(desktop): startup errors shown

This commit is contained in:
Adam
2025-12-17 15:42:50 -06:00
parent b4209582fb
commit e48d804d84
7 changed files with 360 additions and 264 deletions

View File

@@ -26,6 +26,7 @@ export interface TextFieldProps
error?: string
variant?: "normal" | "ghost"
copyable?: boolean
multiline?: boolean
}
export function TextField(props: TextFieldProps) {
@@ -46,6 +47,7 @@ export function TextField(props: TextFieldProps) {
"error",
"variant",
"copyable",
"multiline",
])
const [copied, setCopied] = createSignal(false)
@@ -81,7 +83,12 @@ export function TextField(props: TextFieldProps) {
</Kobalte.Label>
</Show>
<div data-slot="input-wrapper">
<Kobalte.Input {...others} data-slot="input-input" class={local.class} />
<Show
when={local.multiline}
fallback={<Kobalte.Input {...others} data-slot="input-input" class={local.class} />}
>
<Kobalte.TextArea {...others} autoResize data-slot="input-input" class={local.class} />
</Show>
<Show when={local.copyable}>
<Tooltip value={copied() ? "Copied" : "Copy to clipboard"} placement="top" gutter={8}>
<IconButton