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

27 lines
606 B
TypeScript

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;
constructor(private messageService: MessageService,) {
}
ngOnInit() {
}
handleClick() {
this.messageService.add({
severity: 'success',
summary: 'Texte copié',
detail: this.textToCopy
})
}
}