PaymentCard.js 1.18 KB
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
import React from 'react'
Jiwon Yoon's avatar
Jiwon Yoon committed
2
import { Card, Row, Col } from 'react-bootstrap';
Jiwon Yoon's avatar
Jiwon Yoon committed
3

Jiwon Yoon's avatar
Jiwon Yoon committed
4
5

function PaymentCard(props) {
Jiwon Yoon's avatar
Jiwon Yoon committed
6
    return (
Jiwon Yoon's avatar
Jiwon Yoon committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
        <>
            {props.cart.map((e) => (
                    <Card>
                        <Row className="mx-1">
                            <Col className="text-center">
                                <Card.Img className="img-fluid" variant="top" src={e.productId.main_imgUrl && `/images/${e.productId.main_imgUrl}`} style={{ width: '20rem' }} />
                            </Col>
                            <Col md={6} className="p-2">
                                <Card.Body>
                                    <Card.Title className="font-weight-bold mt-3">{e.productId.pro_name}</Card.Title>
                                    <Card.Text>가격: {e.productId.price}</Card.Text>
                                    <Card.Text>옵션: {e.size}/{e.color}</Card.Text>
                                    <Card.Text>수량: {e.count}</Card.Text>
                                </Card.Body>
                            </Col>
                        </Row>
                    </Card>
                ))
            }
        </>
Jiwon Yoon's avatar
Jiwon Yoon committed
27
28
29
30
    )
}

export default PaymentCard