header fine tuning

This commit is contained in:
Nouman Tahir 2021-06-16 13:20:51 +05:00
parent 163a4c11cd
commit c20cad62b5
3 changed files with 27 additions and 19 deletions

View File

@ -2,9 +2,11 @@ import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({
headerContainer: {
height: 100,
flexDirection: 'row',
padding: 21,
paddingTop: 8,
paddingHorizontal: 24,
paddingBottom:24,
alignItems:'center'
},
backIcon: {
color: '$white',
@ -16,7 +18,7 @@ export default EStyleSheet.create({
alignItems: 'center',
},
textWrapper: {
marginLeft: 16,
marginLeft: 24,
},
name: {
color: '$white',

View File

@ -8,6 +8,7 @@ import { IconButton } from '../iconButton';
// Styles
import styles from './avatarHeaderStyles';
import { TouchableOpacity } from 'react-native';
const AvatarHeader = ({
username,
@ -34,22 +35,25 @@ const AvatarHeader = ({
size={25}
/>
<View style={styles.wrapper}>
<UserAvatar
key={`${avatarUrl}-${username}`}
noAction
size="xl"
username={username}
avatarUrl={avatarUrl}
isLoading={isUploading}
/>
<IconButton
iconStyle={styles.addIcon}
style={styles.addButton}
iconType="MaterialCommunityIcons"
name="plus"
onPress={showImageUploadActions}
size={15}
/>
<TouchableOpacity onPress={showImageUploadActions}>
<UserAvatar
key={`${avatarUrl}-${username}`}
noAction
size="xl"
username={username}
avatarUrl={avatarUrl}
isLoading={isUploading}
/>
<IconButton
iconStyle={styles.addIcon}
style={styles.addButton}
iconType="MaterialCommunityIcons"
name="plus"
onPress={showImageUploadActions}
size={15}
/>
</TouchableOpacity>
<View style={styles.textWrapper}>
{!!name && <Text style={styles.name}>{name}</Text>}
<Text style={styles.username}>{`@${username} (${reputation})`}</Text>

View File

@ -1,4 +1,5 @@
import React, { PureComponent, Fragment } from 'react';
import {StatusBar} from 'react-native';
import { injectIntl } from 'react-intl';
import get from 'lodash/get';
import ActionSheet from 'react-native-actionsheet';
@ -55,6 +56,7 @@ class ProfileEditScreen extends PureComponent {
handleOnSubmit,
}) => (
<Fragment>
<StatusBar barStyle='light-content' />
<AvatarHeader
username={get(currentAccount, 'name')}
name={name}