-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreposList.js
More file actions
61 lines (53 loc) · 1.36 KB
/
reposList.js
File metadata and controls
61 lines (53 loc) · 1.36 KB
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
54
55
56
57
58
59
60
import React from 'react';
// function list(repos) {
// return repos[0].map((repo, i) => {
// return (
// <tr key={i}>
// <td>{repo.full_name}</td>
// <td>{repo.language}</td>
// </tr>
// );
// });
// }
//var divStyle = {"backgroundImage": "url('images/github_icon.png')"};
function list(repos) {
return repos[0].map((repo, i) => {
return (
<div className="col-lg-3 col-md-4 col-sm-6 col-xs-12 nopadding" key={i} >
<div className="panel panel-default">
<div className="panel-body">
<div className="img-wrapper">
</div>
<h3 className="panel-title">{repo.full_name}</h3>
<p className="level">{repo.stargazers_count} Stars</p>
<p><img src="language.png" className="icon" /> {repo.language}</p>
</div>
</div>
</div>
);
});
}
// export default (props) => {
// return (
// <table className="table table-striped">
// <thead>
// <tr>
// <td className="h5">Name</td>
// <td className="h5">Language</td>
// </tr>
// </thead>
// <tbody>
// {list(props.repos)}
// </tbody>
// </table>
// );
// }
export default (props) => {
return (
<div className="container">
<div className="row">
{list(props.repos)}
</div>
</div>
);
}