Browse Source

fix: fix button vertical align with icon (#2440)

代强 1 year ago
parent
commit
be0fb99683

+ 5 - 0
packages/semi-foundation/button/button.scss

@@ -36,6 +36,11 @@ $module: #{$prefix}-button;
         }
     }
 
+    &-content{
+        display: flex;
+        align-items: center;
+    }
+
     &-danger {
         background-color: $color-button_danger-bg-default;
         color: $color-button_danger-text-default;

+ 5 - 1
packages/semi-foundation/button/iconButton.scss

@@ -60,12 +60,16 @@ $module: #{$prefix}-button;
 
         &-left {
             margin-right: $spacing-button_iconOnly_content-marginRight;
+            display: flex;
+            align-items: center;
         }
 
         &-right {
             margin-left: $spacing-button_iconOnly_content-marginLeft;
+            display: flex;
+            align-items: center;
         }
     }
 }
 
-@import "./rtl.scss";
+@import "./rtl.scss";