Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

42 lines
965 B

/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { CommentDto, UpsertCommentForm } from '@app/shared/internal';
@Component({
selector: 'sqx-comment',
styleUrls: ['./comment.component.scss'],
templateUrl: './comment.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CommentComponent {
@Output()
public delete = new EventEmitter();
@Output()
public update = new EventEmitter<string>();
@Input()
public comment: CommentDto;
@Input()
public userId: string;
public editForm = new UpsertCommentForm(this.formBuilder);
constructor(
private readonly formBuilder: FormBuilder
) {
}
public emitDelete() {
this.delete.emit();
}
}