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({ export default EStyleSheet.create({
headerContainer: { headerContainer: {
height: 100,
flexDirection: 'row', flexDirection: 'row',
padding: 21, paddingTop: 8,
paddingHorizontal: 24,
paddingBottom:24,
alignItems:'center'
}, },
backIcon: { backIcon: {
color: '$white', color: '$white',
@ -16,7 +18,7 @@ export default EStyleSheet.create({
alignItems: 'center', alignItems: 'center',
}, },
textWrapper: { textWrapper: {
marginLeft: 16, marginLeft: 24,
}, },
name: { name: {
color: '$white', color: '$white',

View File

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

View File

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