Skip to content

Commit 9a750f4

Browse files
author
Lucas95s
committed
feat(items): Change layout of list of items
1 parent daecba4 commit 9a750f4

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/app/components/items-list-item/items-list-item.component.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@
22
<mat-card (click)="handleCardClick($event)">
33
<mat-card-content>
44
<div class="row">
5-
<div class="col-md-3">
5+
<div class="col-md-12">
66
<img class="items-list-item__img" [src]="item.image" [alt]="item.label" />
77
</div>
8-
<div class="col-md-9">
9-
<p>
10-
{{item.label}}
11-
</p>
8+
</div>
9+
<div class="row">
10+
<div class="col-md-12">
11+
<h4 *ngIf="item.label">
12+
<strong>{{item.label}}</strong>
13+
</h4>
1214
<p *ngIf="item.color">
13-
Color: {{item.color}}
15+
<strong>Color:</strong> {{item.color}}
16+
</p>
17+
<p *ngIf="item.category">
18+
<strong>Category:</strong> {{item.category}}
1419
</p>
15-
<p>
16-
Price: {{currencySymbol}}{{item.cost}}
20+
<p *ngIf="item.cost">
21+
<strong>Price:</strong> {{currencySymbol}}{{item.cost}}
1722
</p>
23+
<button mat-raised-button color="primary">More Info</button>
1824
</div>
1925
</div>
2026
</mat-card-content>

src/app/containers/checkout-cart/checkout-cart.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ <h1>Checkout</h1>
2828
</div>
2929
<div class="col-md-10">
3030
<p>{{item.brand}} - {{item.label}}</p>
31+
<p><strong>Category: {{item.category}}</strong></p>
3132
<p><strong>Price per item: </strong>{{currencySymbol}}{{item.cost}}</p>
3233
<p>
3334
<strong>Change Quantity: </strong>

src/app/containers/item-desc/item-desc.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ <h1>Product Details</h1>
1717
</div>
1818
<div class="col-md-7">
1919
<p><strong>Label</strong>: {{item.label}}</p>
20-
<p><strong>Price</strong>: {{currencySymbol}}{{item.cost}}</p>
20+
<p><strong>Category</strong>: {{item.category}}</p>
21+
<p><strong>Price per item</strong>: {{currencySymbol}}{{item.cost}}</p>
2122
<p><strong>Items Available</strong>: {{getItemsAvailable()}}</p>
2223
<p [innerHtml]="item.description"></p>
2324
<button (click)="handleAddToCardClick()" [disabled]="!getItemsAvailable()" mat-raised-button color="primary" class="item-description__add-card">Add To Cart</button>

0 commit comments

Comments
 (0)