-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommentFBUI.js
61 lines (58 loc) · 1.42 KB
/
CommentFBUI.js
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
import React, { memo } from "react";
import { View, Text, StyleSheet } from "react-native";
import ImageAutoSize from "../ImageSize/ImageSize";
function CommentItem({ content, user }) {
return (
<View style={styles.container}>
<View style={{ flexDirection: "row", flexWrap: "nowrap" }}>
<View style={styles.avatar}>
<ImageAutoSize
uri="https://thuthuatnhanh.com/wp-content/uploads/2020/09/hinh-anh-avatar-de-thuong.jpg"
width={50}
height={50}
borderRadius={100}
/>
</View>
<View style={{ flexWrap: "nowrap", flex: 1 }}>
<View style={styles.content}>
<View style={styles.descripWrapper}>
<Text style={styles.name} numberOfLines={2}>
Duy Linh
</Text>
<Text style={styles.descrip}>{content}</Text>
</View>
</View>
</View>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
padding: 5,
},
avatar: {
marginRight: 10,
},
content: {
flex: 1,
flexWrap: "wrap",
},
descripWrapper: {
backgroundColor: "#f7f7f7",
paddingVertical: 5,
paddingHorizontal: 10,
borderRadius: 17,
},
name: {
fontWeight: "bold",
fontSize: 16,
paddingVertical: 5,
},
descrip: {
fontSize: 14,
lineHeight: 24,
color: "#444",
},
});
export default memo(CommentItem);