@@ -242,60 +242,118 @@ const Visualizer = ({ fileUrl }: { fileUrl: string }) => {
242
242
</ div >
243
243
244
244
< Drawer open = { isDrawerOpen } onOpenChange = { setIsDrawerOpen } >
245
- < DrawerContent >
246
- < DrawerHeader >
247
- < DrawerTitle > Component Details</ DrawerTitle >
248
- < DrawerClose />
245
+ < DrawerContent className = "max-w-4xl mx-auto rounded-t-xl" >
246
+ < DrawerHeader className = "border-b border-gray-100" >
247
+ < DrawerTitle className = "text-xl font-bold text-primary" > Component Details</ DrawerTitle >
248
+ < DrawerClose className = "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary" />
249
249
</ DrawerHeader >
250
- < ScrollArea className = "h-[80vh]" >
250
+ < ScrollArea >
251
251
{ cellDetails && (
252
- < div className = "p-4 " >
253
- { /* Add your drawer content here */ }
252
+ < div className = "p-6 space-y-6 " >
253
+ { /* Defaults Section */ }
254
254
{ Object . keys ( cellDetails . defaults ) . length > 0 && (
255
- < div >
256
- < Title > Defaults</ Title >
257
- { Object . entries ( cellDetails . defaults ) . map ( ( [ key , value ] ) => (
258
- < div key = { key } className = "p-1" >
259
- < span className = "font-bold" > { key } : </ span >
260
- < span > { value } </ span >
255
+ < Card className = "overflow-hidden border border-gray-100 shadow-sm" >
256
+ < CardHeader className = "bg-gray-50 py-3 px-4" >
257
+ < CardTitle className = "text-md font-semibold text-primary flex items-center gap-2" >
258
+ < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "2" strokeLinecap = "round" strokeLinejoin = "round" className = "lucide lucide-settings" >
259
+ < path d = "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" > </ path >
260
+ < circle cx = "12" cy = "12" r = "3" > </ circle >
261
+ </ svg >
262
+ Defaults
263
+ </ CardTitle >
264
+ </ CardHeader >
265
+ < CardContent className = "p-4" >
266
+ < div className = "grid grid-cols-1 gap-2" >
267
+ { Object . entries ( cellDetails . defaults ) . map ( ( [ key , value ] ) => (
268
+ < div key = { key } className = "flex justify-between items-center py-1 px-2 rounded hover:bg-gray-50" >
269
+ < span className = "font-medium text-gray-700" > { key } </ span >
270
+ < Badge variant = "outline" className = "font-mono" > { value } </ Badge >
271
+ </ div >
272
+ ) ) }
261
273
</ div >
262
- ) ) }
263
- </ div >
274
+ </ CardContent >
275
+ </ Card >
264
276
) }
265
277
278
+ { /* Inputs Section */ }
266
279
{ Object . keys ( cellDetails . inputs ) . length > 0 && (
267
- < div >
268
- < Title > Inputs</ Title >
269
- { Object . entries ( cellDetails . inputs ) . map ( ( [ key , value ] ) => (
270
- < div key = { key } className = "p-1" >
271
- < span className = "font-bold" > { key } : </ span >
272
- < span > { value } </ span >
280
+ < Card className = "overflow-hidden border border-gray-100 shadow-sm" >
281
+ < CardHeader className = "bg-gray-50 py-3 px-4" >
282
+ < CardTitle className = "text-md font-semibold text-primary flex items-center gap-2" >
283
+ < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "2" strokeLinecap = "round" strokeLinejoin = "round" className = "lucide lucide-arrow-down-right" >
284
+ < path d = "M7 7L17 17" > </ path >
285
+ < path d = "M17 7V17H7" > </ path >
286
+ </ svg >
287
+ Inputs
288
+ </ CardTitle >
289
+ </ CardHeader >
290
+ < CardContent className = "p-4" >
291
+ < div className = "grid grid-cols-1 gap-2" >
292
+ { Object . entries ( cellDetails . inputs ) . map ( ( [ key , value ] ) => (
293
+ < div key = { key } className = "flex justify-between items-center py-1 px-2 rounded hover:bg-gray-50" >
294
+ < span className = "font-medium text-gray-700" > { key } </ span >
295
+ < Badge variant = "outline" className = "font-mono" > { value } </ Badge >
296
+ </ div >
297
+ ) ) }
273
298
</ div >
274
- ) ) }
275
- </ div >
299
+ </ CardContent >
300
+ </ Card >
276
301
) }
277
302
303
+ { /* Pipeline Section */ }
278
304
{ cellDetails . pipeline . length > 0 && (
279
- < div >
280
- < Title > Pipeline</ Title >
281
- { cellDetails . pipeline . map ( ( item , index ) => (
282
- < div key = { index } className = "p-1" >
283
- { item }
305
+ < Card className = "overflow-hidden border border-gray-100 shadow-sm" >
306
+ < CardHeader className = "bg-gray-50 py-3 px-4" >
307
+ < CardTitle className = "text-md font-semibold text-primary flex items-center gap-2" >
308
+ < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "2" strokeLinecap = "round" strokeLinejoin = "round" className = "lucide lucide-git-branch" >
309
+ < line x1 = "6" x2 = "6" y1 = "3" y2 = "15" > </ line >
310
+ < circle cx = "18" cy = "6" r = "3" > </ circle >
311
+ < circle cx = "6" cy = "18" r = "3" > </ circle >
312
+ < path d = "M18 9a9 9 0 0 1-9 9" > </ path >
313
+ </ svg >
314
+ Pipeline
315
+ </ CardTitle >
316
+ </ CardHeader >
317
+ < CardContent className = "p-4" >
318
+ < div className = "space-y-2" >
319
+ { cellDetails . pipeline . map ( ( item , index ) => (
320
+ < div key = { index } className = "flex items-center gap-2" >
321
+ < div className = "flex-shrink-0 w-6 h-6 rounded-full bg-primary-lighter flex items-center justify-center text-xs font-medium text-primary" >
322
+ { index + 1 }
323
+ </ div >
324
+ < div className = "py-2 px-3 bg-gray-50 rounded-md font-mono text-sm flex-grow" >
325
+ { item }
326
+ </ div >
327
+ </ div >
328
+ ) ) }
284
329
</ div >
285
- ) ) }
286
- </ div >
330
+ </ CardContent >
331
+ </ Card >
287
332
) }
288
333
334
+ { /* Outputs Section */ }
289
335
{ Object . keys ( cellDetails . outputs ) . length > 0 && (
290
- < div >
291
- < Title > Outputs</ Title >
292
- { Object . entries ( cellDetails . outputs ) . map ( ( [ key , value ] ) => (
293
- < div key = { key } className = "p-1" >
294
- < span className = "font-bold" > { key } : </ span >
295
- < span > { value } </ span >
336
+ < Card className = "overflow-hidden border border-gray-100 shadow-sm" >
337
+ < CardHeader className = "bg-gray-50 py-3 px-4" >
338
+ < CardTitle className = "text-md font-semibold text-primary flex items-center gap-2" >
339
+ < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "2" strokeLinecap = "round" strokeLinejoin = "round" className = "lucide lucide-arrow-up-right" >
340
+ < path d = "M7 17L17 7" > </ path >
341
+ < path d = "M7 7h10v10" > </ path >
342
+ </ svg >
343
+ Outputs
344
+ </ CardTitle >
345
+ </ CardHeader >
346
+ < CardContent className = "p-4" >
347
+ < div className = "grid grid-cols-1 gap-2" >
348
+ { Object . entries ( cellDetails . outputs ) . map ( ( [ key , value ] ) => (
349
+ < div key = { key } className = "flex justify-between items-center py-1 px-2 rounded hover:bg-gray-50" >
350
+ < span className = "font-medium text-gray-700" > { key } </ span >
351
+ < Badge variant = "outline" className = "font-mono" > { value } </ Badge >
352
+ </ div >
353
+ ) ) }
296
354
</ div >
297
- ) ) }
298
- </ div >
355
+ </ CardContent >
356
+ </ Card >
299
357
) }
300
358
</ div >
301
359
) }
0 commit comments