Skip to content

Commit af90805

Browse files
committed
fix: adjust SliderInput markers positioning for better alignment
1 parent 264c2e7 commit af90805

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/routes/pricing.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ function SliderInput({ label, value, onChange, snapPoints, freeLimit, formatDisp
528528
style={{ background: trackBg }}
529529
/>
530530

531-
{/* Markers */}
532-
<div className="mt-2 flex justify-between">
531+
{/* Markers — absolutely positioned to match thumb travel distance */}
532+
<div className="relative mt-2 h-8">
533533
{snapPoints.map((point, i) => {
534534
const isFreeMarker = point === freeLimit
535535
const isPassed = currentIndex >= i
@@ -540,7 +540,8 @@ function SliderInput({ label, value, onChange, snapPoints, freeLimit, formatDisp
540540
key={i}
541541
type="button"
542542
onClick={() => onChange(point)}
543-
className="flex flex-col items-center gap-0.5 group"
543+
className="absolute flex -translate-x-1/2 flex-col items-center gap-0.5 group"
544+
style={{ left: `calc(9px + ${i / lastIdx} * (100% - 18px))` }}
544545
>
545546
{/* Tick */}
546547
<div

0 commit comments

Comments
 (0)