change images, update readme
This commit is contained in:
@@ -7,7 +7,7 @@ const Compare = ({products}) =>
|
||||
<table className="table">
|
||||
<thead className="thead-default">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th />
|
||||
{products.map(product =>
|
||||
<th key={product.id}>
|
||||
{product.name}
|
||||
@@ -27,7 +27,7 @@ const Compare = ({products}) =>
|
||||
{products.map(product =>
|
||||
<td key={product.id}>
|
||||
{product.colors.map((color, index) =>
|
||||
<span key={index} className={"bg-" + color}></span>
|
||||
<span key={index} className={"bg-" + color} />
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
@@ -35,7 +35,7 @@ const Compare = ({products}) =>
|
||||
<tr className="condition">
|
||||
<th scope="row">Condition</th>
|
||||
{products.map(product =>
|
||||
<td key={product.id} className={product.condition === "Used" ? "bg-red" : "bg-green"}>
|
||||
<td key={product.id} className={product.condition === "Frozen" ? "bg-red" : "bg-green"}>
|
||||
{product.condition}
|
||||
</td>
|
||||
)}
|
||||
@@ -43,6 +43,6 @@ const Compare = ({products}) =>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>;
|
||||
|
||||
export default Compare
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 13px 21px -5px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: 0 13px 21px -5px rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid #eee;
|
||||
font-size: 18px;
|
||||
table-layout: fixed;
|
||||
|
||||
@@ -5,7 +5,7 @@ const Product = ({product, compare}) =>
|
||||
<div key={product.id} className="col-sm-6 col-md-3">
|
||||
<div className={"product " + (product.compare ? "compare" : "")} >
|
||||
<img src={product.image} alt={product.name} />
|
||||
<div className="image_overlay"></div>
|
||||
<div className="image_overlay"/>
|
||||
<div className="view_details" onClick={() => compare(product)}>
|
||||
{product.compare ? "Remove" : "Compare"}
|
||||
</div>
|
||||
@@ -17,6 +17,6 @@ const Product = ({product, compare}) =>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>;
|
||||
|
||||
export default Product
|
||||
|
||||
@@ -10,8 +10,9 @@ $product-main-color: $green;
|
||||
overflow: hidden;
|
||||
transition: all 500ms ease-out;
|
||||
margin-bottom: 30px;
|
||||
border: 1px solid #ddd;
|
||||
&:hover {
|
||||
box-shadow: 0px 13px 21px -5px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 13px 21px -5px rgba(0, 0, 0, 0.2);
|
||||
.image_overlay {
|
||||
opacity: $image-overlay-opacity;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,10 @@ import React from 'react'
|
||||
import {Product} from '../'
|
||||
|
||||
const ProductList = ({products, compare}) =>
|
||||
<div>
|
||||
<div className="row mt-3">
|
||||
{products.map(product =>
|
||||
<Product key={product.id} product={product} compare={compare} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="row mt-3">
|
||||
{products.map(product =>
|
||||
<Product key={product.id} product={product} compare={compare} />
|
||||
)}
|
||||
</div>;
|
||||
|
||||
export default ProductList
|
||||
|
||||
Reference in New Issue
Block a user