From 43c67cf153587894dc991115a474118679a05bc1 Mon Sep 17 00:00:00 2001 From: "Chagarlamudi, Aneela" Date: Wed, 17 Nov 2021 14:41:38 -0500 Subject: [PATCH] :lipstick: Add basic bootstrap styles --- src/components/Cart.js | 2 +- src/components/Product.js | 6 +++--- src/components/ProductItem.js | 14 +++++++++---- src/components/ProductsList.js | 2 +- src/containers/App.js | 14 ++++--------- src/index.js | 36 ++++++++++++++++------------------ 6 files changed, 36 insertions(+), 38 deletions(-) diff --git a/src/components/Cart.js b/src/components/Cart.js index a4c58fb..fd4d0c0 100644 --- a/src/components/Cart.js +++ b/src/components/Cart.js @@ -39,7 +39,7 @@ const Cart = ({ ); return ( -
+

Your shopping cart

{nodes}

diff --git a/src/components/Product.js b/src/components/Product.js index 2a0b3f1..712a8fd 100644 --- a/src/components/Product.js +++ b/src/components/Product.js @@ -2,20 +2,20 @@ import React from "react"; import PropTypes from "prop-types"; const Product = ({ price, quantity, title, discount }) => ( -

+

{title} - {price} {quantity ? ` x ${quantity}` : null} {discount ? ` - discount: buy ${discount.get}, pay for ${discount.pay}` : null} -

+

); Product.propTypes = { price: PropTypes.number, quantity: PropTypes.number, title: PropTypes.string, - discount: PropTypes.object + discount: PropTypes.object, }; export default Product; diff --git a/src/components/ProductItem.js b/src/components/ProductItem.js index 7ac0e01..7866c26 100644 --- a/src/components/ProductItem.js +++ b/src/components/ProductItem.js @@ -4,8 +4,14 @@ import Product from "./Product"; const ProductItem = ({ product, discount, onAddToCartClicked }) => (
- +