Projekt

Obecné

Profil

« Předchozí | Další » 

Revize ca53e9f1

Přidáno uživatelem Schwobik před téměř 2 roky(ů)

Demo of listview implemented
re #10342

Zobrazit rozdíly:

src/components/listView/ItemPreview.tsx
1
import { Center } from "native-base"
1
import { Center, HStack, Image, Text, VStack } from "native-base"
2 2

  
3 3
interface ItemPreviewProps {
4 4
    caption: string
5 5
    title: string
6
    name: string
7
    image: string
6
    name?: string
7
    image?: string
8 8
}
9 9

  
10 10
const ItemPreview = (props: ItemPreviewProps) => {
11 11

  
12 12
    return (
13 13
        <>
14
            <Center>
15 14

  
16
            </Center>
15
            <HStack
16
                space={ 2 }
17
                flex={ 1 }
18
                alignItems={ "start" }
19
            >
20
                <Image
21
                    source={ {uri: `http:/147.228.173.159/static/images/${ props.image ? props.image : "thumb-Rel-78.png" }`} }
22
                    size={ "sm" }
23
                    alt={ props.image ? props.image : "thumb-Rel-78.png" }
24
                />
25
                <VStack>
26
                    <Text>{ props.name }</Text>
27
                    <Text>{ props.caption }</Text>
28
                    <Text>{ props.title }</Text>
29
                </VStack>
30
            </HStack>
17 31
        </>
18 32
    )
19 33
}

Také k dispozici: Unified diff