feat(wizard): add vertical progress stepper with step click navigation
This commit is contained in:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user