-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.js
59 lines (50 loc) · 1.17 KB
/
index.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import React, {Component} from 'react';
import {withRouter} from 'react-router-dom';
import styled from 'react-emotion';
import {
H5, H4, P, primaryNavyBlue, primaryBlue,
} from '../../utils/content';
const ClientAddress = styled('div')``;
const CompanyName = styled(H4)`
color: ${primaryNavyBlue};
margin: 0;
margin-bottom: 10px;
`;
const ContactName = styled(H5)`
color: ${primaryNavyBlue};
margin: 0;
margin-bottom: 10px;
`;
const AddressBlock = styled('div')`
border-top: 1px solid ${primaryBlue};
padding-top: 10px;
`;
const Address = styled(P)`
color: ${primaryBlue};
font-size: 11px;
margin: 0;
margin-bottom: 5px;
`;
class CustomerNameAndAddress extends Component {
render() {
const {
name, firstName, lastName, address,
} = this.props.customer;
return (
<ClientAddress>
<CompanyName>{name}</CompanyName>
<ContactName>
{firstName} {lastName}
</ContactName>
<AddressBlock>
<Address>{address.street}</Address>
<Address>
{address.postalCode} - {address.city}
</Address>
<Address>{address.country}</Address>
</AddressBlock>
</ClientAddress>
);
}
}
export default withRouter(CustomerNameAndAddress);