mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 12:21:31 +03:00
removed tags alignment
This commit is contained in:
parent
b36ba8d5d7
commit
0f512be069
@ -1,17 +1,15 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import React from 'react';
|
||||
import { Text, View, TouchableOpacity } from 'react-native';
|
||||
import styles from './tagStyles';
|
||||
|
||||
const Tag = ({ onPress, isPin, value, isPostCardTag }) => (
|
||||
<Fragment>
|
||||
<TouchableOpacity onPress={() => onPress && onPress(value)}>
|
||||
<View
|
||||
style={[styles.textWrapper, isPin && styles.isPin, isPostCardTag && styles.isPostCardTag]}
|
||||
>
|
||||
<Text style={[styles.text]}>{value}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</Fragment>
|
||||
<TouchableOpacity onPress={() => onPress && onPress(value)}>
|
||||
<View
|
||||
style={[styles.textWrapper, isPin && styles.isPin, isPostCardTag && styles.isPostCardTag]}
|
||||
>
|
||||
<Text style={[styles.text]}>{value}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
|
||||
export default Tag;
|
||||
|
@ -3,5 +3,11 @@ import EStyleSheet from 'react-native-extended-stylesheet';
|
||||
export default EStyleSheet.create({
|
||||
container: {
|
||||
flexDirection: 'row',
|
||||
marginLeft: -20,
|
||||
marginRight: -20,
|
||||
height: 30,
|
||||
},
|
||||
firstTag: {
|
||||
marginLeft: 10,
|
||||
},
|
||||
});
|
||||
|
@ -27,7 +27,9 @@ class TagsView extends PureComponent {
|
||||
data={tags}
|
||||
horizontal
|
||||
renderItem={({ item, index }) => (
|
||||
<Tag key={index} value={item} isPin={index === 0} onPress={handleOnTagPress} />
|
||||
<View style={index === 0 && styles.firstTag}>
|
||||
<Tag key={index} value={item} isPin={index === 0} onPress={handleOnTagPress} />
|
||||
</View>
|
||||
)}
|
||||
keyExtractor={item => item}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user