19 lines
517 B
TypeScript
19 lines
517 B
TypeScript
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
import { VideoListEntry } from 'src/app/model/VideoListEntry';
|
|
|
|
@Component({
|
|
selector: 'shared-video-card',
|
|
templateUrl: './video-card.component.html',
|
|
styleUrls: ['./video-card.component.scss'],
|
|
})
|
|
export class VideoCardComponent {
|
|
@Input() video: VideoListEntry | null = null;
|
|
@Output() clicked = new EventEmitter<VideoListEntry>();
|
|
|
|
onClick(): void {
|
|
if (this.video === null) return;
|
|
|
|
this.clicked.emit(this.video);
|
|
}
|
|
}
|