feat(wizard): add vertical progress stepper with step click navigation

This commit is contained in:
DanielS
2026-08-11 22:28:01 +02:00
parent 2750898524
commit 18228fa8b4
2 changed files with 84 additions and 3 deletions

View File

@@ -543,13 +543,22 @@ export function OrderWizard({
addToBasket()
}
}
setDirection(1)
setStep(s => s + 1)
}
const prevStep = () => {
setDirection(-1)
setStep(s => s - 1)
}
const goToStep = (targetStep: number) => {
if (targetStep < step) {
setDirection(-1)
setStep(targetStep)
}
}
function handleBillingIntervalChange(val: 'one_time' | 'monthly') {
setSelectedBillingInterval(val)
if (val === 'monthly') {
@@ -866,7 +875,7 @@ export function OrderWizard({
Bestell-Wizard
</p>
</div>
<ProgressStepper step={step} basketItemsCount={basketItems.length} />
<ProgressStepper step={step} basketItemsCount={basketItems.length} orientation="vertical" onStepClick={goToStep} />
{/* Step 3 Categories inside left sidebar */}
{step === 3 && (