diff --git a/public/index.html b/public/index.html index ac1043b..8d5e745 100644 --- a/public/index.html +++ b/public/index.html @@ -16,8 +16,8 @@ + rel="stylesheet" /> + + diff --git a/src/App.js b/src/App.js index c6e5940..a6d8bc1 100644 --- a/src/App.js +++ b/src/App.js @@ -87,7 +87,7 @@ const App = () => { return (

BD Store

- +
); }; diff --git a/src/components/Product.js b/src/components/Product.js index b497da4..88b1b11 100644 --- a/src/components/Product.js +++ b/src/components/Product.js @@ -1,15 +1,17 @@ /* eslint-disable react/prop-types */ import React from 'react'; -const Product = () => { +const Product = (props) => { + const { title, price, description, category, image, rating } = props; return ( -
- +
+ {title}
-

product title

-

Price: $ product price

-

Rating: product rating rate/5

-

Description: product.description

+

{title}

+

Category: {category}

+

Price: $ {price}

+

Rating: {rating}/5

+

Description: {description}

diff --git a/src/components/Products.js b/src/components/Products.js index 3da8fdd..696ca83 100644 --- a/src/components/Products.js +++ b/src/components/Products.js @@ -1 +1,25 @@ /* eslint-disable react/prop-types */ +import React from 'react'; +import Product from './Product'; + +const Products = ({ products }) => { + return ( +
+ {products.map(({ id, title, price, description, category, image, rating }) => { + return ( + + ); + })} +
+ ); +}; + +export default Products; diff --git a/src/index.css b/src/index.css index ee9f4f7..ef4526f 100644 --- a/src/index.css +++ b/src/index.css @@ -56,6 +56,12 @@ img { background-color: #2c2c2c; display: flex; flex-direction: column; + margin: 10px 10px; + padding: 10px; + justify-content: center; + align-items: center; + width: 480px; + height: auto; } .product__img { } @@ -76,6 +82,9 @@ img { color: white; font-family: 'Roboto', sans-serif; } +.product__category{ + color: rgb(234, 213, 175); +} .product__price { color: orange; }