2020-02-04 11:35:09 +01:00
|
|
|
import {Component, Input, OnInit} from '@angular/core';
|
|
|
|
import {MessageService} from "primeng/api";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'framadate-copy-text',
|
|
|
|
templateUrl: './copy-text.component.html',
|
|
|
|
styleUrls: ['./copy-text.component.scss']
|
|
|
|
})
|
|
|
|
export class CopyTextComponent implements OnInit {
|
|
|
|
@Input() public textToCopy: any;
|
2020-04-02 17:49:10 +02:00
|
|
|
displayContentToCopy = false;
|
2020-02-04 11:35:09 +01:00
|
|
|
|
|
|
|
constructor(private messageService: MessageService,) {
|
|
|
|
}
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
}
|
|
|
|
|
|
|
|
handleClick() {
|
|
|
|
this.messageService.add({
|
|
|
|
severity: 'success',
|
|
|
|
summary: 'Texte copié',
|
|
|
|
detail: this.textToCopy
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|