fix(mobile): Sprint S — tap targets + iOS safe-area
All checks were successful
CI / test (push) Successful in 2m25s
All checks were successful
CI / test (push) Successful in 2m25s
This commit is contained in:
commit
cd8c04977f
3 changed files with 17 additions and 8 deletions
|
|
@ -182,7 +182,8 @@ export function BookingForm({
|
|||
max={capacity}
|
||||
value={guestCount}
|
||||
onChange={(e) => setGuestCount(Math.max(1, Math.min(capacity, Number(e.target.value) || 1)))}
|
||||
className="mt-0.5 w-full rounded-md border border-zinc-300 px-2 py-1.5"
|
||||
inputMode="numeric"
|
||||
className="mt-0.5 block w-full min-h-[44px] rounded-md border border-zinc-300 px-3 py-2 text-base"
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
|
@ -215,7 +216,7 @@ export function BookingForm({
|
|||
type="button"
|
||||
onClick={submit}
|
||||
disabled={!canSubmit}
|
||||
className="w-full rounded-md bg-emerald-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-emerald-700 disabled:opacity-50"
|
||||
className="w-full min-h-[44px] rounded-md bg-emerald-600 px-4 py-3 text-sm font-semibold text-white hover:bg-emerald-700 disabled:opacity-50"
|
||||
>
|
||||
{busy
|
||||
? "Envoi…"
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export function AddToCart({ itemId, pricePerDay, deposit, maxQty }: Props) {
|
|||
value={start}
|
||||
min={todayPlus(0)}
|
||||
onChange={(e) => setStart(e.target.value)}
|
||||
className="mt-0.5 w-full rounded-md border border-zinc-300 px-2 py-1.5"
|
||||
className="mt-0.5 block w-full min-h-[44px] rounded-md border border-zinc-300 px-3 py-2 text-base"
|
||||
/>
|
||||
</label>
|
||||
<label className="block">
|
||||
|
|
@ -60,7 +60,7 @@ export function AddToCart({ itemId, pricePerDay, deposit, maxQty }: Props) {
|
|||
value={end}
|
||||
min={start || todayPlus(1)}
|
||||
onChange={(e) => setEnd(e.target.value)}
|
||||
className="mt-0.5 w-full rounded-md border border-zinc-300 px-2 py-1.5"
|
||||
className="mt-0.5 block w-full min-h-[44px] rounded-md border border-zinc-300 px-3 py-2 text-base"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
|
@ -73,7 +73,8 @@ export function AddToCart({ itemId, pricePerDay, deposit, maxQty }: Props) {
|
|||
min={1}
|
||||
max={maxQty}
|
||||
onChange={(e) => setQty(Math.max(1, Math.min(maxQty, Number(e.target.value) || 1)))}
|
||||
className="mt-0.5 w-full rounded-md border border-zinc-300 px-2 py-1.5"
|
||||
inputMode="numeric"
|
||||
className="mt-0.5 block w-full min-h-[44px] rounded-md border border-zinc-300 px-3 py-2 text-base"
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
|
@ -97,7 +98,7 @@ export function AddToCart({ itemId, pricePerDay, deposit, maxQty }: Props) {
|
|||
type="button"
|
||||
onClick={onAdd}
|
||||
disabled={alreadyInCart || nights === 0}
|
||||
className="w-full rounded-md bg-emerald-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-emerald-700 disabled:opacity-50"
|
||||
className="w-full min-h-[44px] rounded-md bg-emerald-600 px-4 py-3 text-sm font-semibold text-white hover:bg-emerald-700 disabled:opacity-50"
|
||||
>
|
||||
{alreadyInCart ? "Déjà dans le panier" : "Ajouter au panier"}
|
||||
</button>
|
||||
|
|
@ -108,7 +109,7 @@ export function AddToCart({ itemId, pricePerDay, deposit, maxQty }: Props) {
|
|||
</div>
|
||||
<Link
|
||||
href="/panier"
|
||||
className="block w-full rounded-md bg-emerald-600 px-4 py-2.5 text-center text-sm font-semibold text-white hover:bg-emerald-700"
|
||||
className="block w-full min-h-[44px] rounded-md bg-emerald-600 px-4 py-3 text-center text-sm font-semibold text-white hover:bg-emerald-700"
|
||||
>
|
||||
Voir mon panier
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -113,7 +113,14 @@ export function CartReview({ lines }: { lines: Line[] }) {
|
|||
</section>
|
||||
))}
|
||||
|
||||
<aside className="sticky bottom-3 z-10 rounded-lg border border-zinc-200 bg-white p-4 shadow-md">
|
||||
<aside
|
||||
className="sticky z-10 rounded-lg border border-zinc-200 bg-white p-4 shadow-md"
|
||||
style={{
|
||||
// iOS Safari : tient compte de la safe-area (home indicator).
|
||||
// Fallback à 0.75rem (= bottom-3) sur les navigateurs sans env().
|
||||
bottom: "max(0.75rem, env(safe-area-inset-bottom, 0.75rem))",
|
||||
}}
|
||||
>
|
||||
<dl className="space-y-1 text-sm">
|
||||
<div className="flex justify-between">
|
||||
<dt>Total location</dt>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue