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 212x                                        
<ul class="filter-list clearfix" [id]="'filter-list_' + filterElement.name">
  <ng-container *ngFor="let facet of filterElement.facets">
    <li class="filter-item filter-color" [ngClass]="{ 'filter-selected': facet.selected }">
      <a
        class="filter-swatch"
        [title]="facet.displayName + ' (' + facet.count + ')'"
        (click)="filter(facet)"
        (keypress.down)="filter(facet)"
        [attr.data-testing-id]="'filter-link-' + (facet.displayName | ishSanitize)"
        tabindex="0"
      >
        <span
          [style.background-image]="getBackgroundImage(facet)"
          [style.background-color]="getBackgroundColor(facet)"
          [style.border]="facet.displayName.toLowerCase() === 'white' ? '1px solid #ddd' : null"
        ></span>
      </a>
    </li>
  </ng-container>
</ul>