Browse Source

Bugfix: iconSize problem fixed for hightlight button.

lfabl 2 tuần trước cách đây
mục cha
commit
956d979351

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

@@ -43,6 +43,7 @@ const HighlightButton: FC<IHighlightButtonProps> = ({
     customTheme,
     titleStyle,
     isLoading,
+    iconSize,
     onPress,
     title,
     style,
@@ -98,7 +99,7 @@ const HighlightButton: FC<IHighlightButtonProps> = ({
     };
 
     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/highlightButton/type.ts

@@ -97,6 +97,7 @@ interface IHighlightButtonProps extends Omit<ButtonProps, "title" | "disabled">
     isDisabled?: boolean;
     onPress: () => void;
     isLoading?: boolean;
+    iconSize?: number;
     title?: string;
 }
 export type {