Skip to content

Commit e9ba9cf

Browse files
committed
Demo Gif
1 parent 0d96858 commit e9ba9cf

File tree

5 files changed

+25
-28
lines changed

5 files changed

+25
-28
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# github-api
1+
# Github Profile Search App using Github Api
22

3+
<img src="github-lwc" alt="githubapp">
34
Here will be some information about the app.
45

56
## How to start?

lwc-services.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Find the full example of all available configuration options at
22
// https://github.com/muenzpraeger/lwc-create-app/blob/master/packages/lwc-services/example/lwc-services.config.js
33
module.exports = {
4-
resources: [{ from: 'src/resources', to: 'dist/resources' }],
4+
resources: [{ from: 'src/resources', to: 'dist/resources' }]
55
};

src/modules/my/app/app.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
.search{
1+
.search {
22
text-align: center;
3-
43
}
5-
.search input{
4+
.search input {
65
border-radius: 41px;
76
height: 50px;
87
padding: 10px;
@@ -11,30 +10,29 @@
1110
}
1211
.search input:focus,
1312
.search input:active,
14-
.search input:hover{
13+
.search input:hover {
1514
background: transparent;
1615
outline-color: transparent;
1716
}
18-
.search-results{
17+
.search-results {
1918
border: 1px solid #9e9e9e38;
2019
height: 70px;
2120
width: 300px;
2221
border-radius: 10px;
2322
display: inline-block;
2423
margin: 10px;
2524
}
26-
.search-results p{
25+
.search-results p {
2726
font-size: 20px;
2827
margin-left: 10px;
2928
display: inline-block;
3029
text-transform: capitalize;
3130
}
32-
.search-results img{
31+
.search-results img {
3332
height: 50px;
3433
width: auto;
3534
border-radius: 50px;
3635
float: right;
3736
margin-top: 10px;
3837
margin-right: 10px;
39-
40-
}
38+
}

src/modules/my/app/app.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<template>
2-
32
<div class="search">
4-
<input type="text" name="name" placeholder="Search" onchange={handleSearchKeyChange}>
3+
<input
4+
type="text"
5+
name="name"
6+
placeholder="Search"
7+
onchange={handleSearchKeyChange}
8+
/>
59
</div>
610

711
<div if:true={profiles}>
8-
<ul>
9-
<template for:each={profiles.items} for:item="profile">
10-
<div key={profile.id} class="search-results">
11-
<p>{profile.login}</p>
12-
<img src={profile.avatar_url} alt="" >
13-
14-
</div>
15-
16-
</template>
17-
</ul>
18-
12+
<ul>
13+
<template for:each={profiles.items} for:item="profile">
14+
<div key={profile.id} class="search-results">
15+
<p>{profile.login}</p>
16+
<img src={profile.avatar_url} alt="" />
17+
</div>
18+
</template>
19+
</ul>
1920
</div>
20-
2121
</template>

src/modules/my/app/app.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { LightningElement, track } from 'lwc';
22

3-
const QUERY_URL =
4-
'https://api.github.com/search/users?q=';
3+
const QUERY_URL = 'https://api.github.com/search/users?q=';
54

65
export default class MiscRestCall extends LightningElement {
76
@track searchKey = 'Kumaresan';
@@ -13,7 +12,6 @@ export default class MiscRestCall extends LightningElement {
1312

1413
fetch(QUERY_URL + this.searchKey)
1514
.then(response => {
16-
1715
if (!response.ok) {
1816
this.error = response;
1917
}

0 commit comments

Comments
 (0)