diff options
| author | David Hill <[email protected]> | 2025-12-11 00:46:07 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2025-12-11 00:46:07 +0000 |
| commit | a468044c9fb4ece1f1ae4685d46eb875751b66d8 (patch) | |
| tree | a1879744be543886fa1f50190aff37db8b218c52 /packages/ui/src/components/input.tsx | |
| parent | f0274fd29f7301b8ca79b1573b26efd8d08f31d6 (diff) | |
| parent | fadeed1fa4caacf34054b231784513a841745766 (diff) | |
| download | opencode-a468044c9fb4ece1f1ae4685d46eb875751b66d8.tar.gz opencode-a468044c9fb4ece1f1ae4685d46eb875751b66d8.zip | |
Merge branch 'dev' of https://github.com/sst/opencode into dev
Diffstat (limited to 'packages/ui/src/components/input.tsx')
| -rw-r--r-- | packages/ui/src/components/input.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/ui/src/components/input.tsx b/packages/ui/src/components/input.tsx index cbf23e5c7..82f704e8c 100644 --- a/packages/ui/src/components/input.tsx +++ b/packages/ui/src/components/input.tsx @@ -7,6 +7,7 @@ export interface InputProps Partial<Pick<ComponentProps<typeof Kobalte>, "value" | "onChange" | "onKeyDown">> { label?: string hideLabel?: boolean + hidden?: boolean description?: string } @@ -14,6 +15,7 @@ export function Input(props: InputProps) { const [local, others] = splitProps(props, [ "class", "label", + "hidden", "hideLabel", "description", "value", @@ -21,7 +23,13 @@ export function Input(props: InputProps) { "onKeyDown", ]) return ( - <Kobalte data-component="input" value={local.value} onChange={local.onChange} onKeyDown={local.onKeyDown}> + <Kobalte + data-component="input" + style={{ height: local.hidden ? 0 : undefined }} + value={local.value} + onChange={local.onChange} + onKeyDown={local.onKeyDown} + > <Show when={local.label}> <Kobalte.Label data-slot="input-label" classList={{ "sr-only": local.hideLabel }}> {local.label} |
