Procházet zdrojové kódy

fix button stylelint warning (#1032)

Klaudiusz Dembler před 3 roky
rodič
revize
a7adb31d86
1 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 3 4
      src/shared/components/Button/Button.style.ts

+ 3 - 4
src/shared/components/Button/Button.style.ts

@@ -26,15 +26,14 @@ const sizeOverwriteStyles = ({
   size,
   textOnly,
   iconOnly,
-}: Pick<TextProps, 'size' | 'textOnly' | 'iconOnly'>): SerializedStyles => {
+}: Pick<TextProps, 'size' | 'textOnly' | 'iconOnly'>): SerializedStyles | null => {
   if (textOnly)
     return css`
       padding-left: 0;
       padding-right: 0;
     `
   if (iconOnly) {
-    /* stylelint-disable no-empty-source */
-    return css``
+    return null
   }
   switch (size) {
     case 'large':
@@ -85,7 +84,7 @@ export const ButtonIconWrapper = styled.span<ButtonIconWrapperProps>`
 
 export const StyledText = styled(Text)<TextProps>`
   /* compensate for line-height being 1 */
-  ${textPaddingStyles}
+  ${textPaddingStyles};
 
   color: inherit;
 `