Skip to content

Commit

Permalink
Make button part of content on ContactMethods Page
Browse files Browse the repository at this point in the history
This was achieved by adding the button to the parent ScrollView (and changing the style to styles.mtAuto (this aligns it to the end of the container.
The parent ScrollView is given a style of flexGrow1 to make sure it takes up all the space available.
  • Loading branch information
neonbhai committed Sep 20, 2023
1 parent 08b3e44 commit c922f5c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/pages/settings/Profile/Contacts/ContactMethodsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function ContactMethodsPage(props) {
title={props.translate('contacts.contactMethods')}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_PROFILE)}
/>
<ScrollView>
<ScrollView contentContainerStyle={styles.flexGrow1}>
<View style={[styles.ph5, styles.mv3, styles.flexRow, styles.flexWrap]}>
<Text>
{props.translate('contacts.helpTextBeforeEmail')}
Expand All @@ -128,15 +128,15 @@ function ContactMethodsPage(props) {
</Text>
</View>
{loginMenuItems}
<FixedFooter style={[styles.mtAuto, styles.pt5]}>
<Button
success
text={props.translate('contacts.newContactMethod')}
onPress={() => Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD)}
pressOnEnter
/>
</FixedFooter>
</ScrollView>
<FixedFooter style={[styles.flexGrow0, styles.pt5]}>
<Button
success
text={props.translate('contacts.newContactMethod')}
onPress={() => Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD)}
pressOnEnter
/>
</FixedFooter>
</ScreenWrapper>
);
}
Expand Down

0 comments on commit c922f5c

Please sign in to comment.