]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/buttons/button.component.ts
Add video-playlist-element.created hook (#4196)
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / buttons / button.component.ts
index e23b909458808e9777a04d3356a4b1799069ae46..ee74b3d128cfbb54281fd3badd93e8eea3733863 100644 (file)
@@ -3,7 +3,7 @@ import { GlobalIconName } from '@app/shared/shared-icons'
 
 @Component({
   selector: 'my-button',
-  styleUrls: ['./button.component.scss'],
+  styleUrls: [ './button.component.scss' ],
   templateUrl: './button.component.html'
 })
 
@@ -13,8 +13,18 @@ export class ButtonComponent {
   @Input() icon: GlobalIconName = undefined
   @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,
+      'responsive-label': this.responsiveLabel
+    }
+  }
 }