import React from 'react'; import { View, StyleSheet, Text } from 'react-native'; import EntypoIcon from "react-native-vector-icons/Entypo"; import AntDesignIcon from "react-native-vector-icons/AntDesign"; import Fa5Icon from "react-native-vector-icons/FontAwesome5"; const IconCard = props => { let iconClass; if (props.iconType === "AntDesign") { iconClass = AntDesignIcon; } else if (props.iconType === "FontAwesome5") { iconClass = Fa5Icon; } else if (props.iconType === "Entypo") { iconClass = EntypoIcon; } return ( {props.value} {props.label} ); }; const styles = StyleSheet.create({ card: { flexDirection: 'row', backgroundColor: 'rgba(0, 0, 0, 0.3)', margin: 5, padding: 5, borderRadius: 6, justifyContent: 'space-between', } }); IconCard.defaultProps = { fontSize: 65, flex: 1 }; export default IconCard;