@@ -9,18 +9,31 @@ import {
99} from '@oasisprotocol/ui-library/src/components/ui/sidebar' ;
1010import { Layout } from '@oasisprotocol/ui-library/src/components/ui/layout' ;
1111import { SidebarItemLabel } from './SidebarItemLabel' ;
12+ import {
13+ Card ,
14+ CardContent ,
15+ } from '@oasisprotocol/ui-library/src/components/ui/card' ;
16+ import { ArrowUpRight } from 'lucide-react' ;
17+ import { Button } from '@oasisprotocol/ui-library/src/components/ui/button' ;
1218
1319type CreateLayoutProps = {
1420 children : ReactNode ;
1521 currentStep ?: number ;
22+ docsLink ?: string ;
23+ hints ?:
24+ | {
25+ title : string ;
26+ description : string ;
27+ } [ ]
28+ | undefined ;
1629} ;
1730
1831export const CreateLayout : FC < CreateLayoutProps > = ( {
1932 children,
2033 currentStep = 1 ,
34+ docsLink,
35+ hints = [ ] ,
2136} ) => {
22- // Steps are 0-indexed in the index.tsx file, but we're starting from 1 here
23- // because the first step (Template) has its own layout
2437 const sidebarItems = [
2538 { label : 'Metadata Input' , active : currentStep === 1 } ,
2639 { label : 'Agent Specific Stuff' , active : currentStep === 2 } ,
@@ -45,6 +58,7 @@ export const CreateLayout: FC<CreateLayoutProps> = ({
4558 </ span >
4659 { sidebarItems . map ( ( item , index ) => (
4760 < SidebarItemLabel
61+ completed = { index < currentStep - 1 }
4862 active = { item . active }
4963 key = { item . label }
5064 index = { index }
@@ -57,7 +71,39 @@ export const CreateLayout: FC<CreateLayoutProps> = ({
5771 </ Sidebar >
5872 }
5973 >
60- < div className = "flex-1 p-5 h-5/6" > { children } </ div >
74+ < div className = "flex-1 p-6 h-full" >
75+ < div className = "flex-1 flex flex-col md:flex-row items-start h-full" >
76+ < div className = "max-w-md mx-auto px-8 py-12 flex flex-col gap-8 items-center" >
77+ { children }
78+ </ div >
79+ < Card className = "rounded-md md:w-[200px] border-0 p-4 gap-0 md:h-full" >
80+ < CardContent className = "text-muted-foreground text-sm p-0 flex-1" >
81+ < div className = "flex flex-col justify-between h-full" >
82+ { hints . map ( ( hint , index ) => (
83+ < div key = { index } >
84+ < div className = "text-foreground text-sm font-semibold pb-2" >
85+ { hint . title }
86+ </ div >
87+ < div > { hint . description } </ div >
88+ </ div >
89+ ) ) }
90+ < Button variant = "secondary" asChild className = "w-full mt-6" >
91+ < a
92+ href = { docsLink ?? 'https://docs.oasis.io/' }
93+ target = "_blank"
94+ rel = "noopener noreferrer"
95+ >
96+ < span className = "flex items-center justify-center" >
97+ < span > Read our Docs</ span >
98+ < ArrowUpRight className = "ml-2 h-4 w-4" />
99+ </ span >
100+ </ a >
101+ </ Button >
102+ </ div >
103+ </ CardContent >
104+ </ Card >
105+ </ div >
106+ </ div >
61107 </ Layout >
62108 ) ;
63109} ;
0 commit comments