feat: add icon button component and integrate into cart item for improved UI

This commit is contained in:
2026-07-02 09:13:33 -03:00
parent 202205c038
commit 0a7a9d91c7
9 changed files with 222 additions and 10 deletions

View File

@@ -41,9 +41,11 @@
(increase)="onIncrease()"
(decrease)="onDecrease()"
/>
<button class="border-0 bg-transparent d-inline-flex align-items-center justify-content-center cart-item-remove-btn" type="button" (click)="onRemove()">
<i class="fa-solid fa-trash"></i>
</button>
<app-icon-button
variant="trash"
class="cart-item-remove-btn"
(click)="onRemove()"
/>
</div>
</div>
</article>

View File

@@ -96,10 +96,5 @@
.cart-item-remove-btn {
width: 18px;
height: 18px;
margin-left: 0.35rem;
padding: 0;
color: #b3b3b3;
font-size: 12px;
}

View File

@@ -1,5 +1,6 @@
import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';
import { QuantitySelectorComponent } from '../quantity-selector/quantity-selector.component';
import { IconButtonComponent } from '../icon-button/icon-button.component';
export interface CartItemAttribute {
label: string;
@@ -9,7 +10,7 @@ export interface CartItemAttribute {
@Component({
selector: 'app-cart-item',
standalone: true,
imports: [QuantitySelectorComponent],
imports: [QuantitySelectorComponent, IconButtonComponent],
templateUrl: './cart-item.component.html',
styleUrl: './cart-item.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush