]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/angular/link.component.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / angular / link.component.ts
CommitLineData
98bd5e22 1import { Component, Input, OnInit } from '@angular/core'
37a44fc9
C
2
3@Component({
4 selector: 'my-link',
5 styleUrls: [ './link.component.scss' ],
6 templateUrl: './link.component.html'
7})
98bd5e22 8export class LinkComponent implements OnInit {
d4a8e7a6 9 @Input() internalLink?: string | any[]
37a44fc9
C
10
11 @Input() href?: string
98bd5e22 12 @Input() target = '_self'
37a44fc9
C
13
14 @Input() title?: string
15
98bd5e22 16 @Input() className?: string
dc9c9500 17 @Input() inheritParentCSS = false
98bd5e22 18
37a44fc9 19 @Input() tabindex: string | number
98bd5e22
C
20
21 builtClasses: string
22
23 ngOnInit () {
dc9c9500
C
24 this.builtClasses = this.className || ''
25
26 if (!this.builtClasses || this.inheritParentCSS) {
27 this.builtClasses += ' inherit-parent'
28 }
98bd5e22 29 }
37a44fc9 30}