Skip to content

Commit a88f9b2

Browse files
committed
fix(ui): imporve stepper layout and styling
- Adjusted the stepper component to use full width and centered layout for better responsiveness. - Removed optional label rendering for steps to simplify the UI. - Ensured consistent styling for active and completed steps with updated class names.
1 parent c784606 commit a88f9b2

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

apps/ui/src/lib/components/stepper.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function Stepper({
3636
<div className={cn("flex flex-col gap-8", className)}>
3737
<div className="flex flex-col gap-4">
3838
{/* Desktop stepper - show full horizontal layout */}
39-
<div className="hidden md:flex flex-col gap-4">
39+
<div className="hidden md:flex flex-col gap-4 w-full max-w-3xl mx-auto">
4040
<Progress value={progress} className="h-2" />
4141
<div className="flex justify-between">
4242
{steps.map((step, index) => {
@@ -75,11 +75,6 @@ export function Stepper({
7575
<span className="text-xs font-medium text-center">
7676
{step.title}
7777
</span>
78-
{step.optional && (
79-
<span className="text-xs text-muted-foreground text-center">
80-
(Optional)
81-
</span>
82-
)}
8378
</div>
8479
);
8580
})}
@@ -130,9 +125,16 @@ export function Stepper({
130125
</div>
131126
</div>
132127

133-
<div className="flex flex-col gap-6">{children}</div>
128+
<div
129+
className={cn(
130+
"flex flex-col gap-6 w-full max-w-3xl mx-auto",
131+
activeStep === 2 && "max-w-max",
132+
)}
133+
>
134+
{children}
135+
</div>
134136

135-
<div className="flex justify-between">
137+
<div className="flex justify-between w-full max-w-3xl mx-auto">
136138
<Button
137139
variant="outline"
138140
onClick={() => onStepChange(activeStep - 1)}

0 commit comments

Comments
 (0)