-
- {item.name}
-
-
+function CartItem(props: CartItemProps): JSX.Element {
+ return (
+
+
+
+ {props.item.name}
+
+
+
+
-
- {item.quantityCart + " uds " }
+ color="secondary"
+ size="small"
+ disableElevation
+ variant="contained"
+ onClick={() => props.handleRemoveFromCart(props.item.name)}
+ >
+ -
+
+
+
+
+ {props.item.quantityCart + " uds "}
+
+
-
-
- {(item.price * item.quantityCart).toFixed(2) + " €"}
+ color="secondary"
+ size="small"
+ disableElevation
+ variant="contained"
+ onClick={() => props.handleAddToCart(props.item)}
+ >
+ +
+
+
+
+
+
+
+ {(props.item.price * props.item.quantityCart).toFixed(2) + " €"}
-
-