From de01bad3e8ed87a8914878c94bb4189389bbc4e6 Mon Sep 17 00:00:00 2001 From: noumantahir Date: Tue, 22 Oct 2024 19:25:13 +0500 Subject: [PATCH] consistent top header padding across devices --- package.json | 2 +- src/components/header/view/headerStyles.ts | 5 ++--- src/components/header/view/headerView.tsx | 5 +++-- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 1e1f3bc5f..29c2970b2 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "react-native-receive-sharing-intent": "^2.0.0", "react-native-render-html": "^6.0.5", "react-native-restart": "^0.0.24", - "react-native-safe-area-context": "^4.7.4", + "react-native-safe-area-context": "^4.11.1", "react-native-screens": "3.27.0", "react-native-select-dropdown": "^3.4.0", "react-native-slider": "^0.11.0", diff --git a/src/components/header/view/headerStyles.ts b/src/components/header/view/headerStyles.ts index e715052aa..2f4aeb30d 100644 --- a/src/components/header/view/headerStyles.ts +++ b/src/components/header/view/headerStyles.ts @@ -1,13 +1,12 @@ import EStyleSheet from 'react-native-extended-stylesheet'; -import { Platform } from 'react-native'; export default EStyleSheet.create({ container: { flexDirection: 'row', width: '100%', backgroundColor: '$primaryBackgroundColor', - flex: 1, - maxHeight: Platform.OS === 'ios' ? 105 : 80, + paddingTop:8, + paddingBottom:12, }, containerReverse: { justifyContent: 'space-between', diff --git a/src/components/header/view/headerView.tsx b/src/components/header/view/headerView.tsx index 3cd9719c6..eb7eac11d 100644 --- a/src/components/header/view/headerView.tsx +++ b/src/components/header/view/headerView.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { View, Text, SafeAreaView, TouchableOpacity } from 'react-native'; +import { View, Text, TouchableOpacity} from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; import { useIntl } from 'react-intl'; @@ -14,6 +14,7 @@ import ROUTES from '../../../constants/routeNames'; // Styles import styles from './headerStyles'; +import { SafeAreaView } from 'react-native-safe-area-context'; const HeaderView = ({ displayName, @@ -134,7 +135,7 @@ const HeaderView = ({ ); return ( - + {!hideUser && ( <>