This commit is contained in:
u-e 2018-12-06 18:21:52 +03:00
parent 22c59a9454
commit c1a5624051
3 changed files with 11 additions and 4 deletions

View File

@ -8,11 +8,14 @@ export default EStyleSheet.create({
isPin: {
backgroundColor: '$primaryBlue',
},
isPostCardTag: {
backgroundColor: '$iconColor',
},
textWrapper: {
paddingHorizontal: 10,
justifyContent: 'center',
marginRight: 8,
height: 15,
height: 20,
backgroundColor: '$iconColor',
borderRadius: 50,
},

View File

@ -2,10 +2,14 @@ import React, { Fragment } from 'react';
import { Text, View, TouchableOpacity } from 'react-native';
import styles from './tagStyles';
const Tag = ({ onPress, isPin, value }) => (
const Tag = ({
onPress, isPin, value, isPostCardTag,
}) => (
<Fragment>
<TouchableOpacity onPress={() => onPress && onPress(value)}>
<View style={[styles.textWrapper, isPin && styles.isPin]}>
<View
style={[styles.textWrapper, isPin && styles.isPin, isPostCardTag && styles.isPostCardTag]}
>
<Text style={[styles.text]}>{value}</Text>
</View>
</TouchableOpacity>

View File

@ -77,7 +77,7 @@ class PostHeaderDescription extends Component {
</TouchableOpacity>
{tag && (
<TouchableOpacity onPress={() => tagOnPress && tagOnPress()}>
<Tag isPin value={tag} />
<Tag isPostCardTag isPin value={tag} />
</TouchableOpacity>
)}
<Text style={styles.date}>{date}</Text>