File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
apps/postgres-new/components Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -28,26 +28,34 @@ export default function CodeAccordion({
28
28
< AccordionItem
29
29
value = "item-1"
30
30
className = { cn (
31
- 'border bg-muted px-3 py-2 rounded-md' ,
31
+ 'border rounded-md overflow-hidden ' ,
32
32
error ? 'border-destructive' : undefined ,
33
33
className
34
34
) }
35
35
>
36
- < AccordionTrigger className = "p-0 gap-2" >
36
+ < AccordionTrigger
37
+ className = { cn (
38
+ 'p-0 gap-2 px-3 py-2' ,
39
+ error ? 'bg-destructive border-destructive' : undefined
40
+ ) }
41
+ >
37
42
< div className = "flex gap-2 items-center font-normal text-lighter text-sm" >
38
- < DatabaseZap size = { 14 } className = "text-muted-foreground" />
39
- < span className = { cn ( error ? 'text-destructive' : undefined ) } > { title } </ span >
43
+ < DatabaseZap
44
+ size = { 14 }
45
+ className = { cn ( 'text-muted-foreground' , error && 'text-destructive-foreground' ) }
46
+ />
47
+ < span className = { cn ( error ? 'text-destructive-foreground' : undefined ) } > { title } </ span >
40
48
</ div >
41
49
</ AccordionTrigger >
42
- < AccordionContent className = "py-2 [&_>div]:pb-0 flex flex-col gap-2" >
50
+ < AccordionContent className = "py-2 [&_>div]:pb-0 flex flex-col gap-2 bg-background px-3 " >
43
51
< CodeBlock
44
52
className = { cn ( `language-${ language } ` , 'border-none px-0 pb-4 !bg-inherit' ) }
45
53
hideLineNumbers
46
54
hideCopy
47
55
>
48
56
{ code }
49
57
</ CodeBlock >
50
- { error && < div className = "text-destructive text-xs" > { error } </ div > }
58
+ { error && < div className = "text-red-600 text-xs" > { error } </ div > }
51
59
</ AccordionContent >
52
60
</ AccordionItem >
53
61
</ Accordion >
You can’t perform that action at this time.
0 commit comments