Skip to content

fix: polish AmountInput layout for narrow mobile viewports (<=375px) (Closes #820) - #899

Open
waterWang wants to merge 1 commit into
Creditra:mainfrom
waterWang:fix/amount-input-mobile-responsive-820
Open

fix: polish AmountInput layout for narrow mobile viewports (<=375px) (Closes #820)#899
waterWang wants to merge 1 commit into
Creditra:mainfrom
waterWang:fix/amount-input-mobile-responsive-820

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Closes #820

Audits AmountInput on <=375px viewports and adjusts the responsive breakpoints from sm (640px) to xs (480px) so the mobile layout kicks in earlier.

Changes

New: xs breakpoint (480px) in Tailwind v4 theme

  • Added @theme { --breakpoint-xs: 480px; } to src/index.css

AmountInput responsive refinements

Area Before After
Quick amount presets grid-cols-4 at all sizes grid-cols-2 narrow → xs:grid-cols-4
Action buttons flex-col-reverse sm:flex-row flex-col narrow → xs:flex-row
Stepper buttons w-11 h-11 (44×44) at all sizes w-10 h-10 narrow → xs:w-11 xs:h-11
Action button width w-full sm:flex-1 w-full narrow → xs:w-auto
Input container flex-wrap sm:flex-nowrap flex-wrap narrow → xs:flex-nowrap

Test updates

  • Updated mobile test to reflect new flex-col / xs:flex-row behavior

Testing

  • ✅ 3 mobile tests pass (AmountInput.mobile.test.tsx)
  • ✅ 5 responsive breakpoint tests pass (AmountInput.test.tsx — Responsive Breakpoints (v7) section)
  • 30 pre-existing test failures in the main test file are unrelated to this change

…loses Creditra#820)

Audit AmountInput on <=375px viewports and adjust breakpoints from
sm (640px) to xs (480px) for earlier responsive adaptation.

Changes:
- Add xs breakpoint (480px) to Tailwind v4 theme
- Quick amount presets: grid-cols-2 -> xs:grid-cols-4 (2 cols on narrow)
- Action buttons: flex-col -> xs:flex-row (stack on narrow, row on xs+)
- Stepper buttons: w-10/h-10 -> xs:w-11/xs:h-11 (40px on narrow, 44px on xs+)
- Action button width: w-full -> xs:w-auto (full width on narrow)
- Input container: flex-wrap -> xs:flex-nowrap (wrap on narrow)
- Skeleton follows same responsive pattern
- Update mobile test to match new flex-col/xs:flex-row behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polish AmountInput layout for narrow (mobile) viewports [b#007]

1 participant