feat(mobile): levande knappar – press-scale på Card + haptik på snabblänkar (UX-1)
This commit is contained in:
@@ -5,6 +5,7 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { api } from "@/lib/api";
|
||||
import { useAuth } from "@/lib/auth";
|
||||
import { t } from "@/lib/i18n";
|
||||
import * as Haptics from "expo-haptics";
|
||||
import { formatMinor } from "@/lib/money";
|
||||
import {
|
||||
Body,
|
||||
@@ -179,7 +180,13 @@ function QuickLink({
|
||||
onPress: () => void;
|
||||
}) {
|
||||
return (
|
||||
<Card onPress={onPress} style={{ flex: 1, alignItems: "center", paddingVertical: spacing.sm }}>
|
||||
<Card
|
||||
onPress={() => {
|
||||
void Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
||||
onPress();
|
||||
}}
|
||||
style={{ flex: 1, alignItems: "center", paddingVertical: spacing.sm }}
|
||||
>
|
||||
<Body>{glyph}</Body>
|
||||
<Small>{label}</Small>
|
||||
</Card>
|
||||
|
||||
@@ -68,7 +68,7 @@ export function Card({
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
style={({ pressed }) => [styles.card, style, pressed && { opacity: 0.85 }]}
|
||||
style={({ pressed }) => [styles.card, style, pressed && { opacity: 0.9, transform: [{ scale: 0.97 }] }]}
|
||||
>
|
||||
{children}
|
||||
</Pressable>
|
||||
|
||||
Reference in New Issue
Block a user