header style align tags

This commit is contained in:
feruz 2020-01-29 06:56:33 +02:00
parent 9b052df04a
commit fbb0e550a4
2 changed files with 14 additions and 7 deletions

View File

@ -70,7 +70,7 @@ class PostHeaderDescription extends PureComponent {
/> />
)} )}
</TouchableOpacity> </TouchableOpacity>
<View style={styles.details}> <View style={styles.leftContainer}>
<View style={styles.primaryDetails}> <View style={styles.primaryDetails}>
<TouchableOpacity <TouchableOpacity
style={styles.avatarNameWrapper} style={styles.avatarNameWrapper}
@ -79,11 +79,6 @@ class PostHeaderDescription extends PureComponent {
<Text style={styles.name}>{name}</Text> <Text style={styles.name}>{name}</Text>
<Text style={styles.reputation}>{_reputationText}</Text> <Text style={styles.reputation}>{_reputationText}</Text>
</TouchableOpacity> </TouchableOpacity>
{!!tag && (
<TouchableOpacity onPress={() => tagOnPress && tagOnPress()}>
<Tag isPostCardTag={!isPromoted} isPin value={tag} />
</TouchableOpacity>
)}
{isShowOwnerIndicator && ( {isShowOwnerIndicator && (
<Icon style={styles.ownerIndicator} name="stars" iconType="MaterialIcons" /> <Icon style={styles.ownerIndicator} name="stars" iconType="MaterialIcons" />
)} )}
@ -94,6 +89,13 @@ class PostHeaderDescription extends PureComponent {
</Text> </Text>
</View> </View>
</View> </View>
<View style={styles.rightContainer}>
{!!tag && (
<TouchableOpacity onPress={() => tagOnPress && tagOnPress()}>
<Tag isPostCardTag={!isPromoted} isPin value={tag} />
</TouchableOpacity>
)}
</View>
</View> </View>
</View> </View>
); );

View File

@ -5,7 +5,7 @@ export default EStyleSheet.create({
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
}, },
details: { leftContainer: {
flexDirection: 'column', flexDirection: 'column',
}, },
primaryDetails: { primaryDetails: {
@ -15,6 +15,11 @@ export default EStyleSheet.create({
flexDirection: 'row', flexDirection: 'row',
marginHorizontal: 3, marginHorizontal: 3,
}, },
rightContainer: {
flexDirection: 'column',
marginLeft: 'auto',
paddingLeft: 20,
},
avatar: { avatar: {
borderColor: '$borderColor', borderColor: '$borderColor',
borderWidth: 1, borderWidth: 1,