mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 13:33:03 +00:00
101577: Themed ThumbnailComponent
This commit is contained in:
44
src/app/thumbnail/themed-thumbnail.component.ts
Normal file
44
src/app/thumbnail/themed-thumbnail.component.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { ThemedComponent } from '../shared/theme-support/themed.component';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { ThumbnailComponent } from './thumbnail.component';
|
||||
import { Bitstream } from '../core/shared/bitstream.model';
|
||||
import { RemoteData } from '../core/data/remote-data';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-themed-thumbnail',
|
||||
styleUrls: [],
|
||||
templateUrl: '../shared/theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedThumbnailComponent extends ThemedComponent<ThumbnailComponent> {
|
||||
|
||||
@Input() thumbnail: Bitstream | RemoteData<Bitstream>;
|
||||
|
||||
@Input() defaultImage?: string | null;
|
||||
|
||||
@Input() alt?: string;
|
||||
|
||||
@Input() placeholder?: string;
|
||||
|
||||
@Input() limitWidth?: boolean;
|
||||
|
||||
protected inAndOutputNames: (keyof ThumbnailComponent & keyof this)[] = [
|
||||
'thumbnail',
|
||||
'defaultImage',
|
||||
'alt',
|
||||
'placeholder',
|
||||
'limitWidth',
|
||||
];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'ThumbnailComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../themes/${themeName}/app/thumbnail/thumbnail.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./thumbnail.component');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user