mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +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 { Text, View, TouchableOpacity } from 'react-native';
|
||||||
import styles from './tagStyles';
|
import styles from './tagStyles';
|
||||||
|
|
||||||
const Tag = ({ onPress, isPin, value, isPostCardTag }) => (
|
const Tag = ({ onPress, isPin, value, isPostCardTag }) => (
|
||||||
<Fragment>
|
<TouchableOpacity onPress={() => onPress && onPress(value)}>
|
||||||
<TouchableOpacity onPress={() => onPress && onPress(value)}>
|
<View
|
||||||
<View
|
style={[styles.textWrapper, isPin && styles.isPin, isPostCardTag && styles.isPostCardTag]}
|
||||||
style={[styles.textWrapper, isPin && styles.isPin, isPostCardTag && styles.isPostCardTag]}
|
>
|
||||||
>
|
<Text style={[styles.text]}>{value}</Text>
|
||||||
<Text style={[styles.text]}>{value}</Text>
|
</View>
|
||||||
</View>
|
</TouchableOpacity>
|
||||||
</TouchableOpacity>
|
|
||||||
</Fragment>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
export default Tag;
|
export default Tag;
|
||||||
|
@ -3,5 +3,11 @@ import EStyleSheet from 'react-native-extended-stylesheet';
|
|||||||
export default EStyleSheet.create({
|
export default EStyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
marginLeft: -20,
|
||||||
|
marginRight: -20,
|
||||||
|
height: 30,
|
||||||
|
},
|
||||||
|
firstTag: {
|
||||||
|
marginLeft: 10,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -27,7 +27,9 @@ class TagsView extends PureComponent {
|
|||||||
data={tags}
|
data={tags}
|
||||||
horizontal
|
horizontal
|
||||||
renderItem={({ item, index }) => (
|
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}
|
keyExtractor={item => item}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user