-
Notifications
You must be signed in to change notification settings - Fork 134
/
Copy pathcustomer-quotes.jsx
45 lines (37 loc) · 1.21 KB
/
customer-quotes.jsx
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
import React from "react";
import { HorizontalSplit } from "./horizontal-split";
export class CustomerQuote extends React.Component {
static propTypes = {
name: React.PropTypes.string.isRequired,
title: React.PropTypes.string,
imageUrl: React.PropTypes.string.isRequired,
};
render() {
return (
<div className="neal-customer-quote">
<div className="neal-customer-quote-quote">{this.props.children}</div>
<div className="neal-customer-quote-profile">
<img className="neal-customer-quote-img img-responsive" src={this.props.imageUrl}/>
<span className="neal-customer-quote-name">{this.props.name}</span>
<span className="neal-customer-quote-title">{this.props.title ? `, ${this.props.title}` : null}</span>
</div>
</div>
);
}
}
export class CustomerQuotes extends React.Component {
static propTypes = {
// TODO: Enforce CustomerQuote type
children: React.PropTypes.arrayOf(React.PropTypes.element),
};
render() {
return (
<div className="neal-customer-quotes">
<HorizontalSplit>
{this.props.children}
</HorizontalSplit>
</div>
);
}
}
CustomerQuotes.Quote = CustomerQuote;