forked from open-sauced/open-sauced
-
Notifications
You must be signed in to change notification settings - Fork 2
/
RepoListItem.js
34 lines (33 loc) 路 1.08 KB
/
RepoListItem.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
import React from "react";
import Label from "../styles/Label";
import {FlexStart, FloatRight, FloatLeft, FlexColumn, FlexHeader, FlexCenter} from "../styles/Grid";
import Octicon, {getIconByName} from "@primer/octicons-react";
import Avatar from "../styles/Avatar";
import {chevronRight} from "../icons";
function RepoListItem({goal, stars}) {
return (
<FlexHeader>
<FloatLeft>
<FlexCenter>
<Avatar alt="avatar" src={`https://avatars.githubusercontent.com/${goal.title.split("/")[0]}`} />
<FlexColumn className="details">
<p>{goal.title}</p>
{stars && (
<FlexStart>
<Octicon alt="star" verticalAlign="middle" icon={getIconByName("star")} />
<p>{stars}</p>
</FlexStart>
)}
</FlexColumn>
</FlexCenter>
</FloatLeft>
<FloatRight>
<FlexCenter>
<Label>TBD</Label>
<img alt="pointing right icon" src={chevronRight} />
</FlexCenter>
</FloatRight>
</FlexHeader>
);
}
export default RepoListItem;