All files / src/app/shared/components/basket/basket-error-message basket-error-message.component.ts

100% Statements 7/7
100% Branches 0/0
100% Functions 2/2
100% Lines 6/6

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 216x   6x             6x   3x     3x     3x      
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
 
import { HttpError } from 'ish-core/models/http-error/http-error.model';
 
@Component({
  selector: 'ish-basket-error-message',
  templateUrl: './basket-error-message.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BasketErrorMessageComponent {
  @Input({ required: true }) error: HttpError;
  @Input() cssClass = 'alert alert-danger';
 
  // default values to control scrolling behavior
  scrollSpacing = 64;
 
  get scrollToMessage(): boolean {
    return !!this.error;
  }
}