Deskripsi: - update tampilan diskusi item > judul melebihi container No Issues
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import Styles from "@/constants/Styles";
|
|
import { Feather, Ionicons } from "@expo/vector-icons";
|
|
import { Pressable, View } from "react-native";
|
|
import Text from "./Text";
|
|
|
|
type Props = {
|
|
title: string
|
|
user: string
|
|
date: string
|
|
onPress: () => void
|
|
}
|
|
|
|
export default function DiscussionItem({ title, user, date, onPress }: Props) {
|
|
return (
|
|
<Pressable style={[Styles.wrapItemDiscussion]} onPress={onPress}>
|
|
<View style={[Styles.rowItemsCenter, Styles.mb10]}>
|
|
<Ionicons name="chatbox-ellipses-outline" size={22} color="black" style={Styles.mr10} />
|
|
<View style={[{flex:1}]}>
|
|
<Text style={{ fontWeight: 'bold' }} numberOfLines={1} ellipsizeMode="tail">{title}</Text>
|
|
</View>
|
|
</View>
|
|
<View style={Styles.rowSpaceBetween}>
|
|
<View style={Styles.rowItemsCenter}>
|
|
<Feather name="user" size={18} color="grey" style={Styles.mr05} />
|
|
<Text style={[Styles.textInformation]}>{user}</Text>
|
|
</View>
|
|
<View style={Styles.rowItemsCenter}>
|
|
<Feather name="clock" size={18} color="grey" style={Styles.mr05} />
|
|
<Text style={[Styles.textInformation]}>{date}</Text>
|
|
</View>
|
|
</View>
|
|
</Pressable>
|
|
)
|
|
} |