Animate quantity steppers and make the nav bar sticky

- Add an AnimatedNumber component that slides a quantity stepper's
  count horizontally — left on increment, right on decrement — and
  wire it into both the menu and basket steppers.
- Make the top nav bar position: sticky, with an explicit background
  so scrolled content doesn't show through it.
- Reserve the scrollbar's gutter on every page (scrollable or not) so
  the sticky header doesn't shift width when navigating between short
  and tall pages.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-10 12:30:56 +02:00
co-authored by Claude Sonnet 5
parent 79bd64ce8c
commit e98b0d86d2
6 changed files with 86 additions and 3 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { AnimatedNumber } from '#/components/ui/AnimatedNumber.tsx'
import type { MenuItemWithRecipe } from '#/domain/ordering.ts'
import styles from './MenuList.module.scss'
@@ -51,7 +52,7 @@ export const MenuList = ({
>
−
</button>
<span className={styles.count}>{quantity}</span>
<AnimatedNumber value={quantity} className={styles.count} />
<button
type="button"
className={styles.stepperButton}