merge develop

This commit is contained in:
sarendsen
2025-02-05 09:44:03 +01:00
172 changed files with 16180 additions and 3607 deletions

View File

@@ -1,4 +1,4 @@
import * as Haptics from "@/packages/expo-haptics";
import { useHaptic } from "@/hooks/useHaptic";
import React, { PropsWithChildren, ReactNode, useMemo } from "react";
import { Platform, Text, TouchableOpacity, View } from "react-native";
import { Loader } from "./Loader";
@@ -37,12 +37,14 @@ export const Button: React.FC<PropsWithChildren<ButtonProps>> = ({
case "red":
return "bg-red-600";
case "black":
return "bg-neutral-900 border border-neutral-800";
return "bg-neutral-900";
case "transparent":
return "bg-transparent";
}
}, [color]);
const lightHapticFeedback = useHaptic("light");
return (
<TouchableOpacity
className={`
@@ -54,9 +56,7 @@ export const Button: React.FC<PropsWithChildren<ButtonProps>> = ({
onPress={() => {
if (!loading && !disabled && onPress) {
onPress();
if (!Platform.isTV) {
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
}
lightHapticFeedback();
}
}}
disabled={disabled || loading}