feat(ui): Added loader inside ui-lib. (TV-859)

Squashed commit of the following:

commit 21101f1de202e87c27ae7832669e484d163e66b4
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Thu Oct 28 11:01:09 2021 +0200

    Updated imports

commit 0d8bee6ac8967f5ddb480eff429e91db812b0f16
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Thu Oct 28 10:42:35 2021 +0200

    Now using loader from inside libs
This commit is contained in:
Erik Tiekstra
2021-10-28 11:38:45 +02:00
parent d3c61a4c56
commit b2ff020edf
53 changed files with 106 additions and 219 deletions

View File

@@ -1,4 +1,4 @@
<div [ngClass]="loaderClass">
asdf
<digi-icon-spinner [ngClass]="spinnerClass"></digi-icon-spinner>
<span class="ui-loader__text" *ngIf="uiShowLoadingText">{{uiLoadingText}}</span>
</div>

View File

@@ -10,6 +10,8 @@
.ui-loader {
display: flex;
flex-direction: column;
gap: $digi--layout--gutter--s;
align-items: center;
justify-content: center;
@@ -37,4 +39,8 @@
width: 2.5rem;
}
}
&__text {
font-size: var(--digi--typography--font-size--s);
}
}

View File

@@ -11,6 +11,8 @@ export class LoaderComponent {
private readonly _defaultClass = 'ui-loader';
@Input() uiType: UiLoaderType = UiLoaderType.PADDED;
@Input() uiSize: 's' | 'm' = 'm';
@Input() uiShowLoadingText = false;
@Input() uiLoadingText = 'Laddar innehåll';
get loaderClass(): string {
if (this.uiType) {