]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-custom-markup/peertube-custom-tags/button-markup.component.ts
Add ability to set custom markdown in description
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-custom-markup / peertube-custom-tags / button-markup.component.ts
CommitLineData
63042139 1import { Component, Input } from '@angular/core'
8ee25e17 2import { VideoChannel } from '../../shared-main'
63042139
C
3
4/*
5 * Markup component that creates a button
6*/
7
8@Component({
9 selector: 'my-button-markup',
10 templateUrl: 'button-markup.component.html',
11 styleUrls: [ 'button-markup.component.scss' ]
12})
13export class ButtonMarkupComponent {
14 @Input() theme: 'primary' | 'secondary'
15 @Input() href: string
16 @Input() label: string
17 @Input() blankTarget?: boolean
18
19 channel: VideoChannel
20
21 getTarget () {
22 if (this.blankTarget === true) return '_blank'
23
24 return ''
25 }
26
27 getClasses () {
28 const additionalClass = this.theme === 'primary'
29 ? 'orange-button'
30 : 'grey-button'
31
32 return [ 'peertube-button-link', additionalClass ]
33 }
34}