Customer.js
905 Bytes
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
import React from 'react';
class Customer extends React.Component {
render(){
return(
<div>
<CustomerProfile id ={this.props.id} image = {this.props.image} name = {this.props.name}/>
<CustomerInfo birthday = {this.props.birthday} gender = {this.props.gender} job = {this.props.job}/>
</div>
);
}
}
class CustomerProfile extends React.Component{
render(){
return(
<div>
<img src={this.props.image}alt="profile"/>
<h2>{this.props.name}({this.props.id})</h2>
</div>
);
}
}
class CustomerInfo extends React.Component {
render() {
return (
<div>
<p>{this.props.birthday}</p>
<p>{this.props.gender}</p>
<p>{this.props.job}</p>
</div>
)
}
}
export default Customer;