Explorar o código

Bugfix: title and subTitle custom colors props added to Site Logo component.

lfabl hai 1 mes
pai
achega
f675eb4b70
Modificáronse 2 ficheiros con 8 adicións e 3 borrados
  1. 5 2
      src/components/siteLogo/index.tsx
  2. 3 1
      src/components/siteLogo/type.ts

+ 5 - 2
src/components/siteLogo/index.tsx

@@ -24,9 +24,11 @@ const SiteLogo = ({
     logoBackgroundColor = "default",
     isWorkWithFlex1 = true,
     isShowBorder = false,
+    subTitleCustomColor,
     isCustomImageSize,
     isShowIcon = true,
     isWorkWithAction,
+    titleCustomColor,
     image: ImageProp,
     backgroundColor,
     subTitleVariant,
@@ -188,10 +190,10 @@ const SiteLogo = ({
         >
             <Text
                 variant={titleVariant ? titleVariant : currentSize.titleSize}
-                customColor={titleColor}
+                color={titleColor ? titleColor : "high"}
+                customColor={titleCustomColor}
                 ellipsizeMode="tail"
                 numberOfLines={1}
-                color="high"
                 style={{
                     width: "100%"
                 }}
@@ -202,6 +204,7 @@ const SiteLogo = ({
                 subTitle ?
                     <Text
                         variant={subTitleVariant ? subTitleVariant : currentSize.subTitleSize}
+                        customColor={subTitleCustomColor}
                         ellipsizeMode="tail"
                         numberOfLines={1}
                         color="low"

+ 3 - 1
src/components/siteLogo/type.ts

@@ -54,7 +54,8 @@ interface ISiteLogoProps {
     backgroundColor?: keyof NCoreUIKit.ContainerContentColors | "transparent";
     borderColor?: keyof NCoreUIKit.BorderContentColors | "transparent";
     logoBackgroundColor?: keyof NCoreUIKit.ContainerContentColors;
-    iconColor?: keyof NCoreUIKit.ProjectColorPalette;
+    subTitleCustomColor?: keyof NCoreUIKit.ProjectColorPalette;
+    titleCustomColor?: keyof NCoreUIKit.ProjectColorPalette;
     customTheme?: {
         gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
         sharpness?: keyof NCoreUIKit.SharpnessKey;
@@ -63,6 +64,7 @@ interface ISiteLogoProps {
     };
     style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
     imageSpace?: keyof NCoreUIKit.ActivePalette["spaces"];
+    iconColor?: keyof NCoreUIKit.ProjectColorPalette;
     titleColor?: keyof NCoreUIKit.TextContentColors;
     subTitleVariant?: keyof NCoreUIKit.Typography;
     titleVariant?: keyof NCoreUIKit.Typography;