-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List template is ready with filtering and toggleable favorite star
- Loading branch information
Showing
5 changed files
with
95 additions
and
126 deletions.
There are no files selected for viewing
72 changes: 31 additions & 41 deletions
72
templates/angular/igx-ts/list/default/files/src/app/__path__/__name__.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,31 @@ | ||
.list-sample { | ||
display: block; | ||
position: relative; | ||
height: 640px; | ||
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12); | ||
} | ||
|
||
.item { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.item > [igxLabel], | ||
.item > .person { | ||
position: absolute; | ||
margin-left: 72px; | ||
} | ||
|
||
.person .name { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.person .phone { | ||
font-size: 12px; | ||
color: gray; | ||
} | ||
|
||
.item igx-icon { | ||
color: lightgray; | ||
} | ||
|
||
.item igx-icon.favorite { | ||
color: orange; | ||
} | ||
|
||
.item .delete-item:hover { | ||
color: crimson; | ||
cursor: pointer; | ||
} | ||
igx-icon { | ||
cursor: pointer; | ||
user-select: none; | ||
} | ||
|
||
.item-container { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.contact { | ||
display: flex; | ||
flex: 1 0 240px; | ||
align-items: center; | ||
} | ||
|
||
.contact__info { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
margin-left: 24px; | ||
} | ||
|
||
.name { | ||
font-weight: 600; | ||
} | ||
|
||
.phone { | ||
font-size: 0.875em; | ||
} | ||
|
24 changes: 18 additions & 6 deletions
24
templates/angular/igx-ts/list/default/files/src/app/__path__/__name__.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
<p>igx-list component with filtering. You can read more about configuring the igx-grid component <a href="https://github.com/IgniteUI/igniteui-angular/blob/master/src/list/README.md" target="_blank">here</a>.</p> | ||
<div class="igx-form-group" style="margin: 4px"> | ||
<input class="igx-form-group__input--search" placeholder="Search Contacts" [(ngModel)]="searchContact"> | ||
<label class="igx-form-group__label"> | ||
<igx-icon name="search"></igx-icon> | ||
</label> | ||
</div> | ||
<igx-list> | ||
<igx-list-item [isHeader]="true">Contacts</igx-list-item> | ||
<igx-list-item igxRipple="pink" igxRippleTarget=".igx-list__item" *ngFor="let item of navItems"> | ||
<div class="item"> | ||
<igx-avatar [src]="item.avatar" roundShape="true"></igx-avatar> | ||
<span igxLabel>{{item.text}}</span> | ||
<igx-icon name="star" [class.favorite]="item.favorite"></igx-icon> | ||
<igx-list-item isHeader="true"> Contacts </igx-list-item> | ||
<igx-list-item #item *ngFor="let contact of contacts | igxFilter: filterContacts;"> | ||
<div class="item-container"> | ||
<div class="contact"> | ||
<igx-avatar [src]="contact.photo" roundShape="true"></igx-avatar> | ||
<div class="contact__info"> | ||
<span class="name">{{ contact.name }}</span> | ||
<span class="phone">{{ contact.phone }}</span> | ||
</div> | ||
</div> | ||
<igx-icon name="star" [color]="contact.isFavorite ? 'orange' : 'lightgray'" (click)="toggleFavorite(item)"></igx-icon> | ||
</div> | ||
</igx-list-item> | ||
</igx-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters