mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 21:13:07 +00:00
89984: Add ThemedLoadingComponent
This commit is contained in:
31
src/app/shared/loading/themed-loading.component.ts
Normal file
31
src/app/shared/loading/themed-loading.component.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||
import { LoadingComponent } from './loading.component';
|
||||
|
||||
/**
|
||||
* Themed wrapper for LoadingComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-loading',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedLoadingComponent extends ThemedComponent<LoadingComponent> {
|
||||
|
||||
@Input() message: string;
|
||||
@Input() showMessage = true;
|
||||
|
||||
protected inAndOutputNames: (keyof LoadingComponent & keyof this)[] = ['message', 'showMessage'];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'LoadingComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../themes/${themeName}/app/shared/loading/loading.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./loading.component');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user