aboutsummaryrefslogtreecommitdiff
path: root/src/components/taggs/TaggPostFooter.tsx
blob: 8371a847d9466a33d97d5eee7a2608d72919d4ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import React from 'react';
import {StyleSheet, View} from 'react-native';
import {Text} from 'react-native-animatable';
import {DateLabel} from '../common';

interface TaggPostFooterProps {
  likes?: number;
  handle?: string;
  caption: string;
  timestamp: string;
}
const TaggPostFooter: React.FC<TaggPostFooterProps> = ({
  likes,
  handle,
  caption,
  timestamp,
}) => {
  const handleText = handle ? handle : '';
  return (
    <View>
      <View style={styles.container}>
        {likes ? <Text style={styles.likeText}>{likes} likes</Text> : <></>}
        <View style={styles.captionContainer}>
          <Text style={styles.handleText}>
            {handleText}
            <Text style={styles.captionText}> {caption}</Text>
          </Text>
        </View>
        <DateLabel timestamp={timestamp} type={'small'} />
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flexDirection: 'column',
    paddingHorizontal: 10,
    marginBottom: 50,
  },
  captionContainer: {
    paddingBottom: 30,
  },
  likeText: {
    fontSize: 14,
    fontWeight: 'bold',
    color: 'white',
  },
  handleText: {
    fontSize: 14,
    fontWeight: 'bold',
    color: '#8FA9C2',
  },
  captionText: {
    fontSize: 14,
    fontWeight: 'normal',
    color: 'white',
    flexWrap: 'wrap',
  },
});

export default TaggPostFooter;