1
|
import { Center, HStack, Image, Text, VStack } from "native-base"
|
2
|
import { useEffect } from "react"
|
3
|
|
4
|
interface ItemPreviewProps {
|
5
|
caption: string
|
6
|
title: string
|
7
|
name?: string
|
8
|
image?: string
|
9
|
}
|
10
|
|
11
|
const ItemPreview = (props: ItemPreviewProps) => {
|
12
|
|
13
|
useEffect(() => {
|
14
|
console.log("ItemPreview", "Props:", props)
|
15
|
}, [props])
|
16
|
|
17
|
return (
|
18
|
<>
|
19
|
<HStack
|
20
|
space={ 2 }
|
21
|
flex={ 1 }
|
22
|
alignItems={ "start" }
|
23
|
>
|
24
|
<Image
|
25
|
source={ {uri: `http:/147.228.173.159/static/images/${ props.image ? "thumb-" + props.image : "thumb-Rel-78.png" }`} }
|
26
|
size={ "sm" }
|
27
|
alt={ props.image ? props.image : "thumb-Rel-78.png" }
|
28
|
/>
|
29
|
<VStack h={70}>
|
30
|
<Text fontSize={"sm"} italic>{ props.name }</Text>
|
31
|
<Text fontSize={"sm"} bold>{ props.caption }</Text>
|
32
|
<Text fontSize={"xs"}>{ props.title }</Text>
|
33
|
</VStack>
|
34
|
</HStack>
|
35
|
</>
|
36
|
)
|
37
|
}
|
38
|
|
39
|
export default ItemPreview
|