Skip to content

Commit 34eb36b

Browse files
committed
style: example updated
1 parent d3044f4 commit 34eb36b

File tree

3 files changed

+554
-154
lines changed

3 files changed

+554
-154
lines changed

src/app/app.component.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ <h2><i data-feather="play"></i> Custom template</h2>
8282
<div class="form-group">
8383
<label class="sr-only" for="exampleInputAmount">Colors</label>
8484
<div class="input-group">
85-
<input type="text" placeholder="choose" class="form-control" choosySingleSelect [options]="addresses" [config]="{displayValue:'street',search:{keys:['value.street','value.country']}}"
85+
<input type="text" placeholder="choose" class="form-control" choosySingleSelect [options]="users" [config]="{displayValue:'email',search:{keys:['value.email','value.name.first','value.name.last']}}"
8686
[template]="add" (isOpen)="foobar=$event" (choosy)="addressEvent($event)" />
8787
<div class="input-group-addon" (click)="openAddressDd($event)">
8888
<i class="fa" [ngClass]="{'fa-angle-up':foobar,'fa-angle-down':!foobar}"></i>
@@ -100,6 +100,13 @@ <h2><i data-feather="play"></i> Custom template</h2>
100100

101101

102102
<ng-template let-item #add>
103-
<div><strong>{{item.street}}</strong></div>
104-
<div>{{item.city}} &middot; {{item.country}}</div>
103+
<div class="card">
104+
<div class="pic">
105+
<img src="{{item.picture.thumbnail}}">
106+
</div>
107+
<div class="detail">
108+
<div><strong>{{item.name.first}} {{item.name.last}}</strong></div>
109+
<div>{{item.email}}</div>
110+
</div>
111+
</div>
105112
</ng-template>

src/app/app.component.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
11
#box {
22
text-align: center;
33
}
4+
5+
.card {
6+
display: flex;
7+
align-items: center;
8+
.pic {
9+
margin-right: 12px;
10+
img {
11+
border-radius: 100%;
12+
transition: all 0.5s ease;
13+
transform: scale(0.95);
14+
}
15+
}
16+
.detail {
17+
div:last-child {
18+
opacity: 0.5;
19+
}
20+
}
21+
&:hover {
22+
.pic img {
23+
transform: scale(1);
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)