-
Notifications
You must be signed in to change notification settings - Fork 133
/
team.jsx
53 lines (46 loc) · 1.41 KB
/
team.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
46
47
48
49
50
51
52
53
import React from "react";
import { HorizontalSplit } from "./horizontal-split";
import { Row, Col } from "../helpers/bootstrap";
export class TeamMember extends React.Component {
static propTypes = {
name: React.PropTypes.string.isRequired,
title: React.PropTypes.string,
imageUrl: React.PropTypes.string.isRequired,
};
render() {
return (
<div className="card neal-team-member">
<img className="card-img-top neal-team-member-img img-responsive" src={this.props.imageUrl}/>
<div className="card-block neal-team-member-profile">
<h4 className="card-title lead neal-team-member-name">
{this.props.name}
{this.props.title ? `, ${this.props.title}` : null}
</h4>
<br/>
<div className="neal-team-member-description">{this.props.children}</div>
</div>
</div>
);
}
}
export class Team extends React.Component {
static propTypes = {
// TODO: Enforce Member type
children: React.PropTypes.arrayOf(React.PropTypes.element),
};
render() {
return (
<div className="card-deck-wrapper neal-team">
<Row>
<div className="card-deck">
{this.props.children.map((member, idx) => {
return (
<Col size={["xs-12", "sm-6", "lg-4"]} key={idx}>{member}</Col>
);
})}
</div>
</Row>
</div>
);
}
}