File tree Expand file tree Collapse file tree 5 files changed +25
-28
lines changed
Expand file tree Collapse file tree 5 files changed +25
-28
lines changed Original file line number Diff line number Diff line change 1- # github-api
1+ # Github Profile Search App using Github Api
22
3+ <img src =" github-lwc " alt =" githubapp " >
34Here will be some information about the app.
45
56## How to start?
Original file line number Diff line number Diff line change 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
33module . exports = {
4- resources : [ { from : 'src/resources' , to : 'dist/resources' } ] ,
4+ resources : [ { from : 'src/resources' , to : 'dist/resources' } ]
55} ;
Original file line number Diff line number Diff line change 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 ;
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+ }
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 11import { 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
65export 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 }
You can’t perform that action at this time.
0 commit comments