43 lines
1.0 KiB
React
43 lines
1.0 KiB
React
|
import { faAngleRight } from "@fortawesome/free-solid-svg-icons";
|
||
|
import { FontAwesomeIcon } from "@fortawesome/react-native-fontawesome";
|
||
|
import { useNavigation } from "@react-navigation/native";
|
||
|
import React from "react";
|
||
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
||
|
|
||
|
const Card = ({ cart }) => {
|
||
|
const navigation = useNavigation();
|
||
|
|
||
|
return (
|
||
|
<View style={styles.container}>
|
||
|
<TouchableOpacity
|
||
|
style={styles.subContent}
|
||
|
onPress={() => navigation.navigate(cart.nav)}
|
||
|
>
|
||
|
{cart.icon}
|
||
|
<Text style={styles.subContentText}>{cart.label}</Text>
|
||
|
</TouchableOpacity>
|
||
|
</View>
|
||
|
);
|
||
|
};
|
||
|
const styles = StyleSheet.create({
|
||
|
container: {
|
||
|
width: 120,
|
||
|
justifyContent: "center",
|
||
|
alignItems: "center",
|
||
|
backgroundColor: "#fff",
|
||
|
},
|
||
|
subContent: {
|
||
|
borderRadius:10,
|
||
|
width: "80%",
|
||
|
height:140,
|
||
|
margin:'auto',
|
||
|
alignItems: "center",
|
||
|
paddingTop:30
|
||
|
},
|
||
|
subContentText:{
|
||
|
marginTop:15,
|
||
|
color:'#777777',
|
||
|
textAlign:'center',
|
||
|
}
|
||
|
});
|
||
|
export default Card;
|