// @flow import * as React from 'react'; import {Animated} from "react-native"; import CardListItem from "./CardListItem"; type Props = { dataset: Array, isHorizontal: boolean, } export type cardItem = { title: string, subtitle: string, image: string | number, onPress: () => void, }; export type cardList = Array; export default class CardList extends React.Component { static defaultProps = { isHorizontal: false, } renderItem = ({item}: { item: cardItem }) => { return ( ); }; keyExtractor = (item: cardItem) => item.title; render() { let containerStyle = { ...this.props.contentContainerStyle, height: 150, justifyContent: 'space-around', }; if (!this.props.isHorizontal) { containerStyle = { ...containerStyle, marginLeft: 'auto', marginRight: 'auto', height: 'auto', } } return ( ); } }