]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/buttons/button.component.ts
Refactor button components
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / buttons / button.component.ts
index ee74b3d128cfbb54281fd3badd93e8eea3733863..47605782350966624b23227f7ff3d0685cd57ffd 100644 (file)
@@ -11,19 +11,18 @@ export class ButtonComponent {
   @Input() label = ''
   @Input() className = 'grey-button'
   @Input() icon: GlobalIconName = undefined
+  @Input() routerLink: string[] | string
   @Input() title: string = undefined
   @Input() loading = false
   @Input() disabled = false
   @Input() responsiveLabel = false
 
-  getTitle () {
-    return this.title || this.label
-  }
-
   getClasses () {
     return {
       [this.className]: true,
       disabled: this.disabled,
+      'icon-only': !this.label,
+      'has-icon': !!this.icon,
       'responsive-label': this.responsiveLabel
     }
   }