Prechádzať zdrojové kódy

Feature: iconSize prop added to Button component.

lfabl 1 mesiac pred
rodič
commit
bbc48aa7de

+ 2 - 1
src/components/button/index.tsx

@@ -42,6 +42,7 @@ const Button: FC<IButtonProps> = ({
     customTheme,
     titleStyle,
     isLoading,
+    iconSize,
     onPress,
     title,
     style,
@@ -100,7 +101,7 @@ const Button: FC<IButtonProps> = ({
     };
 
     const iconProps: NCoreUIKit.IconCallbackProps = {
-        size: Number(typography[currentSize.fontSize].fontSize),
+        size: iconSize ? iconSize : Number(typography[currentSize.fontSize].fontSize),
         color: currentType.iconColor
     };
 

+ 1 - 0
src/components/button/type.ts

@@ -105,6 +105,7 @@ interface IButtonProps extends Omit<ButtonProps, "title" | "disabled"> {
     isDisabled?: boolean;
     onPress: () => void;
     isLoading?: boolean;
+    iconSize?: number;
     size?: ButtonSize;
     type?: ButtonType;
     title?: string;