funky-framadate-front/src/app/ui/copy-text/copy-text.component.ts

25 lines
563 B
TypeScript
Raw Normal View History

import { Component, Input, OnInit } from '@angular/core';
import { MessageService } from 'primeng/api';
@Component({
2020-04-22 12:56:18 +02:00
selector: 'app-copy-text',
2020-04-21 10:50:26 +02:00
templateUrl: './copy-text.component.html',
styleUrls: ['./copy-text.component.scss'],
})
export class CopyTextComponent implements OnInit {
2020-04-21 10:50:26 +02:00
@Input() public textToCopy: any;
displayContentToCopy = false;
2020-04-21 10:50:26 +02:00
constructor(private messageService: MessageService) {}
2020-04-21 10:50:26 +02:00
ngOnInit() {}
2020-04-21 10:50:26 +02:00
handleClick() {
this.messageService.add({
severity: 'success',
summary: 'Texte copié',
detail: this.textToCopy,
});
}
}