From b9516382aea50484fb8d3a0ebe1caee69fbaeace Mon Sep 17 00:00:00 2001
From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com>
Date: Tue, 21 May 2024 20:06:52 +0100
Subject: [PATCH] Make header buttons flexible (grow and shrink) to take full
available space
---
src/pages/workspace/categories/WorkspaceCategoriesPage.tsx | 4 ++--
src/pages/workspace/tags/WorkspaceTagsPage.tsx | 4 ++--
src/pages/workspace/taxes/WorkspaceTaxesPage.tsx | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
index a8f863583f7e..7c483b47774a 100644
--- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
+++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
@@ -225,7 +225,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) {
onPress={navigateToCreateCategoryPage}
icon={Expensicons.Plus}
text={translate('workspace.categories.addCategory')}
- style={[styles.mr3, isSmallScreenWidth && styles.w50]}
+ style={[styles.mr3, isSmallScreenWidth && styles.flex1]}
/>
)}
);
diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx
index eca339be0fc4..8be390e1bbb1 100644
--- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx
+++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx
@@ -184,7 +184,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
onPress={navigateToCreateTagPage}
icon={Expensicons.Plus}
text={translate('workspace.tags.addTag')}
- style={[styles.mr3, isSmallScreenWidth && styles.w50]}
+ style={[styles.mr3, isSmallScreenWidth && styles.flex1]}
/>
)}
{policyTags && (
@@ -193,7 +193,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
onPress={navigateToTagsSettings}
icon={Expensicons.Gear}
text={translate('common.settings')}
- style={[isSmallScreenWidth && styles.w50]}
+ style={[isSmallScreenWidth && styles.flex1]}
/>
)}
diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
index 20d1b8f691d3..0ccc749ea1a2 100644
--- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
+++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
@@ -211,14 +211,14 @@ function WorkspaceTaxesPage({
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_TAX_CREATE.getRoute(policyID))}
icon={Expensicons.Plus}
text={translate('workspace.taxes.addRate')}
- style={[styles.mr3, isSmallScreenWidth && styles.w50]}
+ style={[styles.mr3, isSmallScreenWidth && styles.flex1]}
/>