Skip to content

Commit c55225b

Browse files
committed
feat: UI improvements for demo
1 parent 5280aa3 commit c55225b

File tree

13 files changed

+299
-175
lines changed

13 files changed

+299
-175
lines changed

site/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@radix-ui/react-radio-group": "^1.2.3",
1717
"@radix-ui/react-select": "^2.1.6",
1818
"@radix-ui/react-slider": "^1.2.3",
19+
"@radix-ui/react-slot": "^1.1.2",
1920
"@radix-ui/react-switch": "^1.1.3",
2021
"@tailwindcss/vite": "^4.0.9",
2122
"class-variance-authority": "^0.7.1",

site/pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import './App.css'
2-
import { DynamicForm } from './DynamicForm'
2+
import { DemoPage } from './DemoPage'
33
import { ThemeProvider } from "./components/theme-provider"
44

55
function App() {
66
return (
77
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
8-
<DynamicForm />
8+
<DemoPage />
99
</ThemeProvider>
1010
);
1111
}

site/src/DemoPage.tsx

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import { Input } from "./components/Input/Input";
2+
import { Select } from "./components/Select/Select";
3+
import { Button } from "./components/Button/Button";
4+
import { Label } from "./components/Label/Label";
5+
import { SelectTrigger, SelectValue, SelectContent, SelectItem } from "./components/Select/Select";
6+
import { DynamicForm } from "./DynamicForm";
7+
8+
export function DemoPage() {
9+
return (
10+
<div className="min-h-screen flex justify-center">
11+
<div className="flex flex-col gap-20 p-6 w-full max-w-5xl">
12+
{/* Header Section */}
13+
<div className="flex items-center gap-3 mb-8">
14+
<div className="w-8 h-8">🏅</div>
15+
<div>
16+
<h1 className="text-2xl font-semibold">Write Coder on Coder</h1>
17+
<p className="text-content-secondary text-left">New workspace</p>
18+
</div>
19+
<Button variant="outline" className="ml-auto">
20+
Cancel
21+
</Button>
22+
</div>
23+
24+
{/* General Section */}
25+
<div className="grid grid-cols-[320px_1fr] gap-28">
26+
<div>
27+
<h2 className="text-xl mb-2 text-left">General</h2>
28+
<p className="text-content-secondary text-sm text-left">
29+
The name of the workspace and its owner.
30+
Only admins can create workspaces for other users.
31+
</p>
32+
</div>
33+
34+
<div className="space-y-4">
35+
<div className="text-left">
36+
<Label htmlFor="workspace-name" >Workspace Name</Label>
37+
<Input
38+
id="workspace-name"
39+
className="mt-1"
40+
/>
41+
<div className="mt-1 text-sm text-content-secondary">
42+
Need a suggestion? <span className="hover:text-content-primary">fuchsia-tahr-50</span>
43+
</div>
44+
</div>
45+
46+
<div className="text-left">
47+
<Label htmlFor="owner">Owner</Label>
48+
<Select
49+
defaultValue={"[email protected]"}
50+
>
51+
<SelectTrigger>
52+
<SelectValue placeholder={"Select an owner"} />
53+
</SelectTrigger>
54+
<SelectContent>
55+
<SelectItem value="[email protected]">[email protected]</SelectItem>
56+
</SelectContent>
57+
</Select>
58+
</div>
59+
</div>
60+
</div>
61+
62+
{/* External Authentication Section */}
63+
<div className="grid grid-cols-[320px_1fr] gap-6 gap-28">
64+
<div>
65+
<h2 className="text-xl mb-2 text-left">External Authentication</h2>
66+
<p className="text-content-secondary text-sm text-left">
67+
This template uses external services for authentication.
68+
</p>
69+
</div>
70+
71+
<Button
72+
variant="outline"
73+
className="flex items-center gap-2 w-full justify-start"
74+
>
75+
<svg className="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
76+
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
77+
</svg>
78+
<span >Authenticated with GitHub</span>
79+
</Button>
80+
</div>
81+
82+
<div className="grid grid-cols-[320px_1fr] gap-6 gap-28">
83+
<div>
84+
<h2 className="text-xl mb-2 text-left">Parameters</h2>
85+
<p className="text-content-secondary text-sm text-left">
86+
These are the settings used by your template.
87+
Please note that immutable parameters cannot be modified once the workspace is created.
88+
</p>
89+
</div>
90+
91+
<DynamicForm />
92+
</div>
93+
</div>
94+
</div>
95+
);
96+
}

0 commit comments

Comments
 (0)