diff options
| author | Adam <[email protected]> | 2025-12-27 19:43:52 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-27 19:43:52 -0600 |
| commit | 953e4e9446bee016ddbc531f4738cee079a3f34f (patch) | |
| tree | ffad690ecb876282259d5333ccfcdfa7855ddbab /packages/ui/src/components/tabs.tsx | |
| parent | 7ea0d37ee3b01be8788a95db5b6f08690d01465c (diff) | |
| download | opencode-953e4e9446bee016ddbc531f4738cee079a3f34f.tar.gz opencode-953e4e9446bee016ddbc531f4738cee079a3f34f.zip | |
chore(desktop): vertical tabs
Diffstat (limited to 'packages/ui/src/components/tabs.tsx')
| -rw-r--r-- | packages/ui/src/components/tabs.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/ui/src/components/tabs.tsx b/packages/ui/src/components/tabs.tsx index d91ad3c41..0a4d5b91a 100644 --- a/packages/ui/src/components/tabs.tsx +++ b/packages/ui/src/components/tabs.tsx @@ -4,6 +4,7 @@ import type { ComponentProps, ParentProps } from "solid-js" export interface TabsProps extends ComponentProps<typeof Kobalte> { variant?: "normal" | "alt" + orientation?: "horizontal" | "vertical" } export interface TabsListProps extends ComponentProps<typeof Kobalte.List> {} export interface TabsTriggerProps extends ComponentProps<typeof Kobalte.Trigger> { @@ -16,12 +17,14 @@ export interface TabsTriggerProps extends ComponentProps<typeof Kobalte.Trigger> export interface TabsContentProps extends ComponentProps<typeof Kobalte.Content> {} function TabsRoot(props: TabsProps) { - const [split, rest] = splitProps(props, ["class", "classList", "variant"]) + const [split, rest] = splitProps(props, ["class", "classList", "variant", "orientation"]) return ( <Kobalte {...rest} + orientation={split.orientation} data-component="tabs" data-variant={split.variant || "normal"} + data-orientation={split.orientation || "horizontal"} classList={{ ...(split.classList ?? {}), [split.class ?? ""]: !!split.class, |
