forked from MetaMask/metamask-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GithubContributor.vue
47 lines (46 loc) · 882 Bytes
/
GithubContributor.vue
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
<template>
<div>
<div>
<div v-for="contributor in metaMaskContributorList" class="card">
<img :src="contributor.avatar_url" width="100px" />
<h4>
<a :href="contributor.html_url" target="_blank">
{{ contributor.login }}
</a>
</h4>
</div>
</div>
</div>
</template>
<style scoped>
.card {
display: inline-block;
min-width: 175px;
text-align: center;
}
h4 {
margin-top: 0;
}
</style>
<script>
export default {
props: {
repoName: {
type: String,
required: true,
},
},
data() {
return {
metaMaskContributorList: [],
};
},
mounted() {
fetch(`https://api.github.com/repos/MetaMask/${this.repoName}/contributors`)
.then((response) => response.json())
.then((data) => {
this.metaMaskContributorList = data;
});
},
};
</script>