From 49e859cfd6565c4ef67388c232e639917ec20625 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Tue, 14 Oct 2025 12:06:13 -0500
Subject: wip: css/ui work
---
packages/ui/src/app.tsx | 146 +++++++++++++++++++++-------------
packages/ui/src/components/index.ts | 1 +
packages/ui/src/components/select.tsx | 10 ++-
packages/ui/src/components/tabs.tsx | 74 +++++++++++++++++
packages/ui/src/index.css | 3 +-
packages/ui/src/index.tsx | 1 -
6 files changed, 175 insertions(+), 60 deletions(-)
create mode 100644 packages/ui/src/components/tabs.tsx
(limited to 'packages/ui/src')
diff --git a/packages/ui/src/app.tsx b/packages/ui/src/app.tsx
index be2ec357e..f42781543 100644
--- a/packages/ui/src/app.tsx
+++ b/packages/ui/src/app.tsx
@@ -1,66 +1,100 @@
import type { Component } from "solid-js"
-import { Button } from "./components/button"
-import { Select } from "./components"
+import { Button, Select, Tabs } from "./components"
import "@opencode-ai/css"
import "./index.css"
const App: Component = () => {
+ const Content = (props: { dark?: boolean }) => (
+
+
Buttons
+
+
+
+
+
+
+
+
+
Select
+
+
Tabs
+
+
+
+ Tab 1
+ Tab 2
+ Tab 3
+
+ Disabled Tab
+
+
+
+
+
Tab 1 Content
+
This is the content for the first tab.
+
+
+
+
+
Tab 2 Content
+
This is the content for the second tab.
+
+
+
+
+
Tab 3 Content
+
This is the content for the third tab.
+
+
+
+
+
Tab 4 Content
+
This tab should be disabled.
+
+
+
+
+
+ )
+
return (
-
-
Buttons
-
-
-
-
-
-
-
-
- Select
-
-
-
-
-
Buttons
-
-
-
-
-
-
-
-
- Select
-
-
-
+
+
)
}
diff --git a/packages/ui/src/components/index.ts b/packages/ui/src/components/index.ts
index 80d80299b..be12d6a67 100644
--- a/packages/ui/src/components/index.ts
+++ b/packages/ui/src/components/index.ts
@@ -1,3 +1,4 @@
export * from "./button"
export * from "./icon"
export * from "./select"
+export * from "./tabs"
diff --git a/packages/ui/src/components/select.tsx b/packages/ui/src/components/select.tsx
index c4d5443c1..ecf05d5e2 100644
--- a/packages/ui/src/components/select.tsx
+++ b/packages/ui/src/components/select.tsx
@@ -79,11 +79,17 @@ export function Select(props: SelectProps & ButtonProps) {
}}
-
+
-
+
diff --git a/packages/ui/src/components/tabs.tsx b/packages/ui/src/components/tabs.tsx
new file mode 100644
index 000000000..5e047a7ca
--- /dev/null
+++ b/packages/ui/src/components/tabs.tsx
@@ -0,0 +1,74 @@
+import { Tabs as Kobalte } from "@kobalte/core/tabs"
+import { splitProps } from "solid-js"
+import type { ComponentProps, ParentProps } from "solid-js"
+
+export interface TabsProps extends ComponentProps {}
+export interface TabsListProps extends ComponentProps {}
+export interface TabsTriggerProps extends ComponentProps {}
+export interface TabsContentProps extends ComponentProps {}
+
+function TabsRoot(props: TabsProps) {
+ const [split, rest] = splitProps(props, ["class", "classList"])
+ return (
+
+ )
+}
+
+function TabsList(props: TabsListProps) {
+ const [split, rest] = splitProps(props, ["class", "classList"])
+ return (
+
+ )
+}
+
+function TabsTrigger(props: ParentProps) {
+ const [split, rest] = splitProps(props, ["class", "classList", "children"])
+ return (
+
+ {split.children}
+
+ )
+}
+
+function TabsContent(props: ParentProps) {
+ const [split, rest] = splitProps(props, ["class", "classList", "children"])
+ return (
+
+ {split.children}
+
+ )
+}
+
+export const Tabs = Object.assign(TabsRoot, {
+ List: TabsList,
+ Trigger: TabsTrigger,
+ Content: TabsContent,
+})
diff --git a/packages/ui/src/index.css b/packages/ui/src/index.css
index be7adaaed..b5f1cf302 100644
--- a/packages/ui/src/index.css
+++ b/packages/ui/src/index.css
@@ -12,7 +12,7 @@
}
main > div {
flex: 1;
- padding: 3rem;
+ padding: 2rem;
min-width: 0;
overflow-y: auto;
overflow-x: hidden;
@@ -24,6 +24,7 @@
font-size: 1.25rem;
font-weight: 600;
margin: 0 0 1rem 0;
+ margin-bottom: -1rem;
}
section {
display: flex;
diff --git a/packages/ui/src/index.tsx b/packages/ui/src/index.tsx
index 216765711..0e4c4a018 100644
--- a/packages/ui/src/index.tsx
+++ b/packages/ui/src/index.tsx
@@ -1,6 +1,5 @@
/* @refresh reload */
import { render } from "solid-js/web"
-import "solid-devtools"
import App from "./app"
--
cgit v1.2.3