Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix send/receive buttons styles #1791

Merged
merged 1 commit into from
Aug 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 25 additions & 24 deletions app/components/UI/DrawerView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import { getEther } from '../../../util/transactions';
import { newAssetTransaction } from '../../../actions/transaction';
import { protectWalletModalVisible } from '../../../actions/user';

const ANDROID_OFFSET = 38;
const styles = StyleSheet.create({
wrapper: {
flex: 1,
Expand Down Expand Up @@ -120,13 +119,17 @@ const styles = StyleSheet.create({
},
buttons: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
borderBottomColor: colors.grey100,
borderBottomWidth: 1,
padding: 15
},
button: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 30,
borderWidth: 1.5
},
Expand All @@ -137,25 +140,21 @@ const styles = StyleSheet.create({
marginLeft: 5
},
buttonText: {
marginLeft: Device.isIos() ? 8 : 28,
marginTop: Device.isIos() ? 0 : -23,
paddingBottom: Device.isIos() ? 0 : 3,
paddingLeft: 8,
fontSize: 15,
color: colors.blue,
...fontStyles.normal
},
buttonContent: {
flexDirection: 'row',
alignItems: 'flex-start',
alignItems: 'center',
justifyContent: 'center'
},
buttonIcon: {
marginTop: 0
},
buttonReceive: {
transform: Device.isIos()
? [{ rotate: '90deg' }]
: [{ rotate: '90deg' }, { translateX: ANDROID_OFFSET }, { translateY: ANDROID_OFFSET }]
transform: [{ rotate: '90deg' }]
},
menu: {},
noTopBorder: {
Expand Down Expand Up @@ -895,30 +894,32 @@ class DrawerView extends PureComponent {
type={'rounded-normal'}
onPress={this.onSend}
containerStyle={[styles.button, styles.leftButton]}
style={styles.buttonContent}
>
<MaterialIcon
name={'arrow-top-right'}
size={22}
color={colors.blue}
style={styles.buttonIcon}
/>
<Text style={styles.buttonText}>{strings('drawer.send_button')}</Text>
<View style={styles.buttonContent}>
<MaterialIcon
name={'arrow-top-right'}
size={22}
color={colors.blue}
style={styles.buttonIcon}
/>
<Text style={styles.buttonText}>{strings('drawer.send_button')}</Text>
</View>
</StyledButton>
<StyledButton
type={'rounded-normal'}
onPress={this.onReceive}
containerStyle={[styles.button, styles.rightButton]}
style={styles.buttonContent}
testID={'drawer-receive-button'}
>
<MaterialIcon
name={'keyboard-tab'}
size={22}
color={colors.blue}
style={[styles.buttonIcon, styles.buttonReceive]}
/>
<Text style={styles.buttonText}>{strings('drawer.receive_button')}</Text>
<View style={styles.buttonContent}>
<MaterialIcon
name={'keyboard-tab'}
size={22}
color={colors.blue}
style={[styles.buttonIcon, styles.buttonReceive]}
/>
<Text style={styles.buttonText}>{strings('drawer.receive_button')}</Text>
</View>
</StyledButton>
</View>
<View style={styles.menu}>
Expand Down