forked from AdaGold/video-store-consumer
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathCustomer.js
27 lines (23 loc) · 1011 Bytes
/
Customer.js
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
import React from 'react';
import PropTypes from 'prop-types';
import { Button } from 'react-bootstrap';
import './Customer.css'
const Customer = (props) => {
return (
<ul className="customer-row">
<div class="customer-text">
<li><h1>{props.customer.name}</h1></li>
<li><strong>Address: </strong>{props.customer.address}</li>
<li>{props.customer.city}, {props.customer.state} {props.customer.postal_code}</li>
<li><strong>Phone: </strong>{props.customer.phone}</li>
<li><strong>Account Credit: </strong>${props.customer.account_credit}</li>
<li><strong>Videos Checked Out: </strong>{props.customer.videos_checked_out_count}</li>
<li><Button variant="outline-info" onClick={() => props.onSelectCustomer(props.customer.id, props.customer.name)}>Select Customer</Button></li>
</div>
</ul>
);
}
Customer.propTypes = {
onSelectCustomer: PropTypes.func.isRequired,
};
export default Customer;