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