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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user