]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix button icon margin
authorChocobozzz <me@florianbigard.com>
Fri, 10 Jun 2022 08:04:23 +0000 (10:04 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 10 Jun 2022 08:04:23 +0000 (10:04 +0200)
client/src/app/shared/shared-main/buttons/button.component.html
client/src/app/shared/shared-main/buttons/button.component.scss
client/src/app/shared/shared-main/buttons/button.component.ts

index 11c8ffeddd308fe9464a7c864b9c326061f1cda5..d1a4215e6e481b1533202f7461a1ca983e104a23 100644 (file)
@@ -1,6 +1,6 @@
 <span class="action-button" [ngClass]="getClasses()" [ngbTooltip]="title" tabindex="0">
-  <my-global-icon *ngIf="icon && !loading" [iconName]="icon"></my-global-icon>
   <my-small-loader [loading]="loading"></my-small-loader>
+  <my-global-icon *ngIf="icon && !loading" [iconName]="icon"></my-global-icon>
 
   <span *ngIf="label" class="button-label">{{ label }}</span>
 
index c782ac3ef218b55b27af2163f2bfb9298e0facce..c53b8f2e50a463dcae30e88c8e796738c68a8436 100644 (file)
@@ -34,6 +34,12 @@ span[class$=-button] {
   @include button-with-icon(21px);
 
   width: 100%; // useful for ellipsis, allow to define a max-width on host component
+
+  &.icon-only {
+    my-global-icon {
+      margin: 0;
+    }
+  }
 }
 
 .orange-button {
index b97012d9a0a725b0bfe7a3a0363e371f8881adfa..52936a4d47076b4873ea5087efe037e4d70c49b6 100644 (file)
@@ -20,6 +20,7 @@ export class ButtonComponent {
     return {
       [this.className]: true,
       disabled: this.disabled,
+      'icon-only': !this.label,
       'responsive-label': this.responsiveLabel
     }
   }