ListCard.js 1.2 KB
Newer Older
이재연's avatar
dd    
이재연 committed
1
import React from 'react';
이재연's avatar
zz    
이재연 committed
2
import { Card } from 'react-bootstrap'
이재연's avatar
0113    
이재연 committed
3
4
5
6
7

function ListCard(props) {

    return (
        <>
이재연's avatar
zz    
이재연 committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
            {props.productlist.map((e) => (
                <Card>
                    <Card className="mt-5" style={{ width: "18rem", margin: "auto" }}>
                        <Card.Img variant="top" src={e.main_imgUrl && `/images/${e.main_imgUrl}`} style={{ objectFit: "contain", height: "22rem" }} />
                        <Card.Body>
                            <Card.Title>{e.pro_name}</Card.Title>
                            <Card.Text>{e.price}</Card.Text>
                        </Card.Body>
                    </Card>
                    <Card className="mt-5" style={{ width: "18rem", margin: "auto" }}>
                        <Card.Img variant="top" src={e.detail_imgUrl && `/images/${e.detail_imgUrl}`} style={{ objectFit: "contain", height: "22rem" }} />
                        <Card.Body>
                            <Card.Title>{e.pro_name}</Card.Title>
                            <Card.Text>{e.price}</Card.Text>
                        </Card.Body>
                    </Card>
                </Card>

            ))}
        </> 
이재연's avatar
0113    
이재연 committed
28
    )
이재연's avatar
zz    
이재연 committed
29
30
31
            }
   

이재연's avatar
0113    
이재연 committed
32
33

export default ListCard