feat: implement cart icon component with quantity badge and integrate into store header for improved UI
This commit is contained in:
13
src/app/shared/components/cart-icon/cart-icon.component.html
Normal file
13
src/app/shared/components/cart-icon/cart-icon.component.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<button
|
||||
type="button"
|
||||
[disabled]="disabled()"
|
||||
[attr.aria-label]="ariaLabel()"
|
||||
class="cart-icon"
|
||||
>
|
||||
<div class="cart-icon__container">
|
||||
<i class="fa-solid fa-cart-shopping cart-icon__glyph" aria-hidden="true"></i>
|
||||
@if (hasQuantity()) {
|
||||
<span class="cart-icon__badge" data-testid="cart-badge">{{ quantity() }}</span>
|
||||
}
|
||||
</div>
|
||||
</button>
|
||||
Reference in New Issue
Block a user