forked from ivacf/ivanc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RepoCard.js
executable file
·36 lines (32 loc) · 1023 Bytes
/
RepoCard.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
var React = require('react');
var StarsBox = require('./StarsBox.js');
var RepoCard = React.createClass({
render: function() {
var data = this.props.data;
var footerColorStyle = {
background: data.color
};
return (
<div className="card">
<a target="_blank" href={data.url} title={data.title}>
<img className="cardImage" src={data.image} />
<div className="cardFooter" style={footerColorStyle}>
<div className="cardRepoFooterFirstLine">
<h1 className="cardTitle">
{data.title}
</h1>
<div className="cardStarsBox">
{data.stars != null ? <StarsBox stars={data.stars} /> : null}
</div>
</div>
<p className="cardText">
{data.subtitle}
</p>
<img className="cardIcon" src={data.platform.icon} alt={data.platform.name} />
</div>
</a>
</div>
);
}
});
module.exports = RepoCard;