All files / src/app/shared/components/filter/filter-swatch-images filter-swatch-images.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 211x                                        
<ul class="filter-list clearfix" [id]="filterElement.id">
  @for (facet of filterElement.facets; track facet.name) {
  <li class="filter-item filter-color" [ngClass]="{ 'filter-selected': facet.selected }">
    <button
      type="button"
      class="filter-swatch btn btn-link btn-link-action"
      [title]="facet.displayName + ' (' + facet.count + ')'"
      (click)="filter(facet)"
      [attr.data-testing-id]="'filter-link-' + (facet.displayName | ishSanitize)"
      [attr.aria-current]="facet.selected ? 'true' : undefined"
    >
      <span
        [style.background-image]="getBackgroundImage(facet)"
        [style.background-color]="getBackgroundColor(facet)"
        [style.border]="facet.displayName.toLowerCase() === 'white' ? '1px solid #ddd' : null"
      ></span>
    </button>
  </li>
  }
</ul>