feature(digi-ng-migrering: Flyttat digi-button till vår egen kod (TV-865)
Merge in TEA/mina-sidor-fa-web from feature/TV-865-link-button to develop
Squashed commit of the following:
commit 45f3795aff7883c66302f27faf4b63ebf37f6041
Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se>
Date: Fri Nov 19 11:13:33 2021 +0100
Update _buttons.scss
commit 586e84e689719c0be5a675a262b12fdb075fe6af
Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se>
Date: Fri Nov 19 11:05:01 2021 +0100
wip
commit 62bf98e55a83d2bae91ddaa7ce9c95a8db725c20
Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se>
Date: Fri Nov 19 10:54:34 2021 +0100
simplify backlink class
commit a7d230b246b175f18c8aa156ec4bb90078618987
Merge: 0792de12 c6bbfb1b
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Nov 18 14:33:49 2021 +0100
Merged develop and fixed conflicts
commit 0792de125e6d74d2f56674ec757033634b3d2fcc
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Nov 18 11:24:06 2021 +0100
Added support for service-style link-buttons and replaced digi-ng-link-button
commit 3e9136806a4fc71b1ebcf75163698a9c3a5c7601
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Nov 18 09:29:33 2021 +0100
Removed unused imports inside modules
commit c1c93e405c545d033c7f8904fae21721b8b1d7ae
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Nov 18 09:18:51 2021 +0100
Added back-link component inside ui-libs
commit 4dd32d2b4b981d5e3337b19b8d144994a5f60468
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Nov 18 06:56:32 2021 +0100
changed links styled as button to link-button component
This commit is contained in:
@@ -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 {}
|
||||
Reference in New Issue
Block a user