Fix progress line not connecting if there's only one (#2449)

This commit is contained in:
ekzyis 2025-08-27 16:05:47 +02:00 committed by GitHub
parent 8fa158246c
commit 7fcc1b1b78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {}
}