From 7fcc1b1b788c396a0de95c3b96cc89f38b3a4a70 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 27 Aug 2025 16:05:47 +0200 Subject: [PATCH] Fix progress line not connecting if there's only one (#2449) --- components/multi-step-form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/multi-step-form.js b/components/multi-step-form.js index c3ad2f5b..797b917f 100644 --- a/components/multi-step-form.js +++ b/components/multi-step-form.js @@ -53,11 +53,12 @@ export function MultiStepForm ({ children, initial, steps }) { function Progress () { const steps = useSteps() + const maxSteps = useMaxSteps() const stepIndex = useStepIndex() const style = (index) => { switch (index) { - case 0: return { marginLeft: '-5px', marginRight: '-13px' } + case 0: return maxSteps === 2 ? { marginLeft: '-13px', marginRight: '-15px' } : { marginLeft: '-5px', marginRight: '-13px' } case 1: return { marginLeft: '-13px', marginRight: '-15px' } default: return {} }