Viktoriia 4 days ago
parent
commit
54f87cba48
2 changed files with 8 additions and 4 deletions
  1. 3 1
      src/components/Header/index.tsx
  2. 5 3
      src/components/Header/style.ts

+ 3 - 1
src/components/Header/index.tsx

@@ -46,7 +46,9 @@ export const Header: FC<Props> = ({
           {shouldClose ? <CloseSvg /> : <ChevronLeft fill={Colors.DARK_BLUE} />}
         </View>
       </TouchableOpacity>
-      <Text style={[styles.label, { color: textColor }]}>{label}</Text>
+      <Text style={[styles.label, { color: textColor }]} numberOfLines={1}>
+        {label}
+      </Text>
       {rightElement ? <View>{rightElement}</View> : <View style={styles.placeholder} />}
     </View>
   );

+ 5 - 3
src/components/Header/style.ts

@@ -22,10 +22,12 @@ export const styles = StyleSheet.create({
   label: {
     fontFamily: 'redhat-700',
     fontSize: getFontSize(14),
-    color: Colors.DARK_BLUE
+    color: Colors.DARK_BLUE,
+    flexShrink: 1,
+    paddingHorizontal: 2
   },
   placeholder: {
     width: 25,
-    height: 25,
-  },
+    height: 25
+  }
 });