PostItem

Usage

import {
    PostItem, // post item component
    ProfileAuthor, // user profile component 
} from "@components";

let item = {
    image: require("@assets/images/trip-1.jpg"),
    title: "Overseas Adventure Travel In Nepal",
    description: "Lorem ipsum dolor sit amet, velit tamquam eum et, pro agam sanctus minimum ut. Usu prompta invidunt at, noluisse ponderum nec ne. ",
    authorImage: require("@assets/images/profile-1.jpg"),
    name: "Steve Garrett",
    detail: "5 hours ago | 100k views",
    date: "Jun 2018"
}

<PostItem
    image={item.image}
    title={item.title}
    description={item.description}
    onPress={() => navigation.navigate("PostDetail")}
>
    <ProfileAuthor
        image={item.authorImage}
        name={item.name}
        detail={item.detail}
        style={{ paddingHorizontal: 20 }}
    />
</PostItem>

Props

style

Type: StyleProp
Customize CSS style ViewStyle

image

Type: String | Required
Path of image display on card

title

Type: String | Required
Title of post item

description

Type: String
Description of post item

onPress

Type: Function
Function to execute on press post item