import React from "react"; import { StyleSheet, Text, View } from "react-native"; type StatItem = { title: string; value: string; }; type StatListProps = { items: StatItem[]; style?: object; }; const StatList: React.FC = ({ items, style }) => { return ( {items.map((item, index) => ( {item.title} {item.value} ))} ); }; const styles = StyleSheet.create({ container: { flexDirection: "column", flex: 1, padding: 5, }, item: { borderLeftWidth: 0.5, borderRightColor: "lightgrey", marginBottom: 10, }, title: { fontSize: 16, color: "grey", textAlign: "center", }, value: { fontSize: 28, fontWeight: "bold", textAlign: "center", }, }); export default StatList;