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

View File

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