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:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user