@@ -43,21 +43,30 @@ const schema = {
4343 body : {
4444 type : 'sidebar-menu-button' ,
4545 active : true ,
46- body : { type : 'span' , body : { type : 'text' , content : 'Dashboard' } }
46+ body : [
47+ { type : 'icon' , name : 'SquareTerminal' } ,
48+ { type : 'span' , body : { type : 'text' , content : 'Dashboard' } }
49+ ]
4750 }
4851 } ,
4952 {
5053 type : 'sidebar-menu-item' ,
5154 body : {
5255 type : 'sidebar-menu-button' ,
53- body : { type : 'span' , body : { type : 'text' , content : 'Projects' } }
56+ body : [
57+ { type : 'icon' , name : 'Frame' } ,
58+ { type : 'span' , body : { type : 'text' , content : 'Projects' } }
59+ ]
5460 }
5561 } ,
5662 {
5763 type : 'sidebar-menu-item' ,
5864 body : {
5965 type : 'sidebar-menu-button' ,
60- body : { type : 'span' , body : { type : 'text' , content : 'Tasks' } }
66+ body : [
67+ { type : 'icon' , name : 'Map' } ,
68+ { type : 'span' , body : { type : 'text' , content : 'Tasks' } }
69+ ]
6170 }
6271 }
6372 ]
@@ -75,14 +84,20 @@ const schema = {
7584 type : 'sidebar-menu-item' ,
7685 body : {
7786 type : 'sidebar-menu-button' ,
78- body : { type : 'span' , body : { type : 'text' , content : 'Profile' } }
87+ body : [
88+ { type : 'icon' , name : 'User' } ,
89+ { type : 'span' , body : { type : 'text' , content : 'Profile' } }
90+ ]
7991 }
8092 } ,
8193 {
8294 type : 'sidebar-menu-item' ,
8395 body : {
8496 type : 'sidebar-menu-button' ,
85- body : { type : 'span' , body : { type : 'text' , content : 'Billing' } }
97+ body : [
98+ { type : 'icon' , name : 'CreditCard' } ,
99+ { type : 'span' , body : { type : 'text' , content : 'Billing' } }
100+ ]
86101 }
87102 }
88103 ]
@@ -94,9 +109,36 @@ const schema = {
94109 {
95110 type : 'sidebar-footer' ,
96111 body : {
97- type : 'div' ,
98- className : 'p-4 text-xs text-muted-foreground border-t' ,
99- body : { type : 'text' , content : 'v1.0.0' }
112+ type : 'sidebar-menu' ,
113+ body : {
114+ type : 'sidebar-menu-item' ,
115+ body : {
116+ type : 'sidebar-menu-button' ,
117+ size : 'lg' ,
118+ className : 'data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground' ,
119+ body : {
120+ type : 'div' ,
121+ className : 'flex items-center gap-2 text-left leading-tight' ,
122+ body : [
123+ {
124+ type : 'avatar' ,
125+ src : 'https://github.com/shadcn.png' ,
126+ alt : '@shadcn' ,
127+ fallback : 'SC' ,
128+ className : 'h-8 w-8 rounded-lg'
129+ } ,
130+ {
131+ type : 'div' ,
132+ className : 'grid flex-1 text-left text-sm leading-tight' ,
133+ body : [
134+ { type : 'span' , className : 'truncate font-semibold' , body : { type : 'text' , content : 'Troy Su' } } ,
135+ { type : 'span' , className : 'truncate text-xs' , body : { type : 'text' , content : 'troy@object-ui.com' } }
136+ ]
137+ }
138+ ]
139+ }
140+ }
141+ }
100142 }
101143 }
102144 ]
@@ -239,8 +281,35 @@ const schema = {
239281 title : 'Interactive Chart' ,
240282 body : {
241283 type : 'div' ,
242- className : 'h-[350px] flex items-center justify-center bg-muted/50 rounded-md border border-dashed text-muted-foreground m-6' ,
243- body : { type : 'text' , content : 'Chart Area Placeholder' }
284+ className : 'p-6' ,
285+ body : {
286+ type : 'chart' ,
287+ chartType : 'bar' ,
288+ className : "aspect-auto h-[350px] w-full" ,
289+ data : [
290+ { month : "January" , desktop : 186 , mobile : 80 } ,
291+ { month : "February" , desktop : 305 , mobile : 200 } ,
292+ { month : "March" , desktop : 237 , mobile : 120 } ,
293+ { month : "April" , desktop : 73 , mobile : 190 } ,
294+ { month : "May" , desktop : 209 , mobile : 130 } ,
295+ { month : "June" , desktop : 214 , mobile : 140 } ,
296+ ] ,
297+ config : {
298+ desktop : {
299+ label : "Desktop" ,
300+ color : "hsl(var(--primary))" ,
301+ } ,
302+ mobile : {
303+ label : "Mobile" ,
304+ color : "hsl(var(--primary)/0.5)" ,
305+ } ,
306+ } ,
307+ xAxisKey : "month" ,
308+ series : [
309+ { dataKey : "desktop" } ,
310+ { dataKey : "mobile" }
311+ ]
312+ }
244313 }
245314 } ,
246315 {
0 commit comments