Merge branch 'develop' into feature/TV-565-signal-view

This commit is contained in:
Daniel Appelgren
2021-11-19 11:20:34 +01:00
63 changed files with 292 additions and 221 deletions
@@ -1,4 +0,0 @@
<a [ngClass]="backLinkClass" [routerLink]="route">
<msfa-icon *ngIf="showIcon" [icon]="iconType.ARROW_LEFT"></msfa-icon>
<ng-content></ng-content>
</a>
@@ -1,12 +0,0 @@
@import 'mixins/buttons';
@import 'mixins/link';
.back-link {
&--link {
@include msfa__link(true);
}
&--button {
@include msfa__button('secondary');
}
}
@@ -1,28 +0,0 @@
/* tslint:disable:no-unused-variable */
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { BackLinkComponent } from './back-link.component';
describe('BackLinkComponent', () => {
let component: BackLinkComponent;
let fixture: ComponentFixture<BackLinkComponent>;
beforeEach(async(() => {
void TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [BackLinkComponent],
imports: [RouterTestingModule],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BackLinkComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,24 +0,0 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { IconType } from '@msfa-enums/icon-type.enum';
@Component({
selector: 'msfa-back-link',
templateUrl: './back-link.component.html',
styleUrls: ['./back-link.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BackLinkComponent {
private readonly _defaultClass = 'back-link';
@Input() route: string[];
@Input() showIcon = true;
@Input() asButton = false;
iconType = IconType;
get backLinkClass(): string {
if (this.asButton) {
return `${this._defaultClass} ${this._defaultClass}--button`;
}
return `${this._defaultClass} ${this._defaultClass}--link`;
}
}
@@ -1,13 +0,0 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { IconModule } from '../icon/icon.module';
import { BackLinkComponent } from './back-link.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [BackLinkComponent],
imports: [CommonModule, RouterModule, IconModule],
exports: [BackLinkComponent],
})
export class BackLinkModule {}