aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/buttons/copy-button.component.ts
blob: aac9ab8b093632e0d2893d4aefd48e8f6c9138cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Component, Input } from '@angular/core'
import { Notifier } from '@app/core'

@Component({
  selector: 'my-copy-button',
  styleUrls: [ './copy-button.component.scss' ],
  templateUrl: './copy-button.component.html'
})
export class CopyButtonComponent {
  @Input() value: string
  @Input() title: string
  @Input() notification: string
  @Input() isInputGroup = false

  constructor (private notifier: Notifier) {

  }

  activateCopiedMessage () {
    if (this.notification) this.notifier.success(this.notification)
  }
}