All files / src/app/shared/components/cards/card card.title.description.view.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 2/2
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34                                      1x   3x 3x       3x     3x 2x      
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { IonHeader, IonToolbar, IonTitle, IonContent, IonItem, IonLabel, IonItemSliding, IonItemOptions, IonItemOption, IonIcon } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import { trash } from 'ionicons/icons';
 
export interface ICardTitleDescription {
  id: string;
  title: string;
  description: string | null;
}
 
@Component({
  selector: 'app-card-title-description-view',
  templateUrl: 'card.title.description.view.html',
  styleUrls: ['card.title.description.view.scss'],
  standalone: true,
  imports: [IonIcon, IonItemOption, IonItemOptions, IonItemSliding, IonItem, IonLabel],
 
})
export class CardTitleDescriptionViewComponent {
 
  @Output() action = new EventEmitter<string | undefined>();
  @Output() delete = new EventEmitter<string | undefined>();
  @Input() content?: ICardTitleDescription;
 
  constructor() {
    addIcons({ trash });
  }
 
  deleteInternal = () => {
    this.delete.emit(this.content?.id)
  }
}