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