import React from "react"; import { View, Text, StyleSheet, Image } from "react-native"; const CartSubCard = ({ cart }) => { return ( {cart.name} {cart.price ? ( <> ₱{cart.price} {cart.promo ? ( {" "} {cart.price - cart.price * 0.3}{" "} (-{cart.promo}%) ) : null} ) : ( No price )} ); }; const styles = StyleSheet.create({ container: { // width: "95%", margin: 5, borderRadius: 6, borderColor: "#dddd", borderWidth: 1, overflow: "hidden", flexDirection: "row", padding: 10, backgroundColor:'#ffffff' }, header: { position: "fixed", width: "100%", top: 0, }, footer: { // position: "absolute", bottom: 0, width: "100%", }, imgWrap:{ padding:10 }, wrapper: { height: "85%", width: "60%", }, priceCon: { flexDirection: "row", paddingVertical: 10, }, textPrice: { fontSize: 14, fontWeight: "600", textTransform: "capitalize", color: "#ffaa00", }, textPricePromo: { fontSize: 14, fontWeight: "600", textTransform: "capitalize", textDecorationLine: "line-through", color: "#ffaa00", }, details: { // width: "50%", }, text: { fontSize: 13, }, }); export default CartSubCard;