PaymentCard.js 1.34 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
        <>
            {props.cart.map((e) => (
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
                <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>
                                <input type="image" name={String(e._id)} alt="삭제버튼" src="https://img.icons8.com/fluent-systems-regular/24/000000/close-window.png" className="float-right" onClick={props.deleteOrder} />
                                <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
26
27
            }
        </>
Jiwon Yoon's avatar
Jiwon Yoon committed
28
29
30
31
    )
}

export default PaymentCard