Initial commit

Generated by create-expo-app 3.2.0.
This commit is contained in:
Dennis Hundertmark
2025-03-10 19:49:23 +01:00
commit b24544f115
30 changed files with 17173 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
import { StyleSheet, Text, View, TouchableOpacity } from "react-native";
import React from "react";
import useCartStore from "@/store/cartStore";
import { COLORS } from "@/utils/colors";
import { Ionicons } from "@expo/vector-icons";
import { Link } from "expo-router";
const CardButton = () => {
const { count } = useCartStore();
return (
<Link href="/cart" asChild>
<TouchableOpacity onPress={() => {}}>
{count > 0 && (
<View style={styles.countContainer}>
<Text style={styles.countText}>{count}</Text>
</View>
)}
<Ionicons name="cart" size={28} color="black" />
</TouchableOpacity>
</Link>
);
};
export default CardButton;
const styles = StyleSheet.create({
countContainer: {
position: "absolute",
right: -10,
bottom: -5,
backgroundColor: COLORS.primary,
borderRadius: 10,
zIndex: 1,
width: 20,
height: 20,
alignItems: "center",
justifyContent: "center",
},
countText: {
fontSize: 12,
fontWeight: "bold",
color: COLORS.white,
},
});