Files
EMI-ExpoAPP/components/Comment.js
Adolfo Reyna 983ac258b3 New Comment
2022-03-07 18:15:40 -08:00

55 lines
1.6 KiB
JavaScript

import React, { useState, useEffect } from 'react';
import { Text, View, ScrollView, StyleSheet } from 'react-native';
import { FAB, Button, Card, Title, IconButton } from 'react-native-paper';
import API from './../API.js';
import UserName from './UserName.js';
import Media from './Media.js';
import AwesomeIcon from 'react-native-vector-icons/FontAwesome';
let Comment = ({ comment }) => {
return (
<Card style={styles.comment}>
<Card.Content>
<View style={{flexDirection: "row", alignItems: "center", justifyContent: "center"}}>
<View style={{flex:8}}>
<Text style={styles.userName}>
<UserName profileid={comment.profileid} />
</Text>
</View>
<View style={{flex:2}}>
<Button
icon="favorite-border"
dense={true}
onPress={() => console.log('Pressed')}
/>
</View>
</View>
<Text style={{fontSize: 16}}>{comment.content}</Text>
</Card.Content>
</Card>
);
}
export default Comment;
const styles = StyleSheet.create({
comment: {
margin: 8,
marginTop: 0,
},
userName: {
fontSize: 14,
fontWeight: 'bold',
marginBottom: 5,
fontSize: 16
},
likeComment: {
position: 'absolute',
margin: 16,
right: 0,
top: 0,
},
});