Skip to content

Commit da4d4b7

Browse files
committed
refactor(ui): remove redundant padding and simplify layout in accordion components
- Removed default padding classes from AccordionContent in ui/accordion.tsx for cleaner styling - Simplified UploadProgress structure by eliminating unnecessary div wrappers and adjusting spacing in upload-progress.tsx for better layout consistency
1 parent cb185cf commit da4d4b7

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

src/components/ui/accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function AccordionContent({ className, children, ...props }: React.ComponentProp
4242
data-slot="accordion-content"
4343
{...props}
4444
>
45-
<div className={cn('pt-0 pb-4', className)}>{children}</div>
45+
<div className={className}>{children}</div>
4646
</AccordionPrimitive.Content>
4747
)
4848
}

src/components/upload/upload-progress.tsx

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,23 @@ export default function UploadProgress({ fileName, fileSize, progress }: UploadP
109109
defaultValue="file-card"
110110
type="single"
111111
>
112-
<AccordionItem className="space-y-6" value="file-card">
113-
<div className="space-y-6">
114-
<div className="flex justify-between items-center">
115-
<div className="flex flex-col gap-1">
116-
<div className="text-white">{fileName}</div>
117-
<div className="text-zinc-400">{fileSize}</div>
118-
</div>
119-
<div className="flex items-center gap-6">
120-
{getCombinedFirstStageStatus() === 'completed' ? (
121-
<BadgeStatus status="pinned" />
122-
) : (
123-
<BadgeStatus status={getCombinedFirstStageStatus()} />
124-
)}
125-
<AccordionTrigger />
126-
</div>
112+
<AccordionItem value="file-card">
113+
<div className="flex justify-between items-center">
114+
<div className="flex flex-col gap-1">
115+
<p className="text-white font-medium">{fileName}</p>
116+
<p className="text-zinc-400">{fileSize}</p>
117+
</div>
118+
<div className="flex items-center gap-6">
119+
{getCombinedFirstStageStatus() === 'completed' ? (
120+
<BadgeStatus status="pinned" />
121+
) : (
122+
<BadgeStatus status={getCombinedFirstStageStatus()} />
123+
)}
124+
<AccordionTrigger />
127125
</div>
128126
</div>
129127

130-
<AccordionContent className="space-y-6">
128+
<AccordionContent className="space-y-6 mt-6">
131129
{/* Combined first stage: creating-car + checking-readiness + uploading-car */}
132130
{progress.find((p) => p.step === 'creating-car') && (
133131
<CardWrapper>

0 commit comments

Comments
 (0)