Skip to content

Commit

Permalink
Merge pull request #42443 from s77rt/flex-header-buttons
Browse files Browse the repository at this point in the history
Make header buttons flexible (grow and shrink) to take full available space
  • Loading branch information
roryabraham authored May 23, 2024
2 parents 6a60bc4 + b951638 commit aa9bbcf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ 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]}
/>
)}
<Button
medium
onPress={navigateToCategoriesSettings}
icon={Expensicons.Gear}
text={translate('common.settings')}
style={[isSmallScreenWidth && styles.w50]}
style={[isSmallScreenWidth && styles.flex1]}
/>
</View>
);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/tags/WorkspaceTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 && (
Expand All @@ -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]}
/>
)}
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
/>
<Button
medium
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_TAXES_SETTINGS.getRoute(policyID))}
icon={Expensicons.Gear}
text={translate('common.settings')}
style={[isSmallScreenWidth && styles.w50]}
style={[isSmallScreenWidth && styles.flex1]}
/>
</View>
) : (
Expand Down

0 comments on commit aa9bbcf

Please sign in to comment.