File size: 1,139 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import React from "react";

export const ProductCard = (props) => {
  const { title, img, offer } = props;
  return (
    <>
      <div id="prodcut-card">
        <div>
          <h1 className="product-title">{title}</h1>
        </div>
        <div className="product-informationFirst">
          <img className="image" src={img} alt="" />
        </div>
        <div>
          <span className="product-offer">{offer}</span>
        </div>
      </div>
    </>
  );
};

export const ProductCard2 = (props) => {
  const { title, Detail } = props;
  return (
    <>
      <div id="prodcut-card">
        <div>
          <h1 className="product-title">{title}</h1>
        </div>
        <div className="product-information">
        {
          Detail.map((item) => (
            <div className="product-img-container" key={item.id}>
              <img  className="image" src={item.offerImage} />
              <p className="image-description">{item.offer}</p>
            </div>
          ))
        }
        </div>
        <div>
          <span className="product-offer">See all Offers</span>
        </div>
      </div>
    </>
  );
};