import React from 'react'; import { View, Text, Button, StyleSheet } from 'react-native'; import QuantityAdjuster from './QuantityAdjuster'; const CartItem = ({ item, onUpdateQuantity }) => ( {item.name} ${item.price.toFixed(2)} onUpdateQuantity(item.id, newQuantity)} /> ); const styles = StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', padding: 10, borderBottomWidth: 1, borderColor: '#ccc' }, name: { fontSize: 18 }, price: { fontSize: 16, color: '#888' }, }); export default CartItem;