import React from 'react'; import { Dimensions, Image, ListRenderItemInfo, StyleSheet, } from 'react-native'; import { Card, CardElement, List, ListElement, ListProps, Layout, Text, } from '@ui-kitten/components'; import { LayoutItem } from '../model/layout-item.model'; export interface LayoutGridListProps extends Omit { data: LayoutItem[]; onItemPress: (index: number) => void; } export type LayoutGridListElement = React.ReactElement; export const LayoutGridList = (props: LayoutGridListProps): ListElement => { const { contentContainerStyle, onItemPress, ...listProps } = props; const renderItem = (info: ListRenderItemInfo): CardElement => { const renderItemHeader = (evaProps): React.ReactElement => ( {info.item.title} {info.item.description} ); return ( onItemPress(info.index)}> ); }; return ( ); }; const styles = StyleSheet.create({ container: { padding: 8, }, itemHeader: { paddingHorizontal: 8, }, itemContainer: { flex: 1, margin: 8, maxWidth: Dimensions.get('window').width / 2 - 24, }, itemImage: { height: 276, width: '100%', resizeMode: 'contain', }, });