import { StyleProp, StyleSheet, View, ViewStyle } from "react-native"; import { ThemedText } from "../ThemedText"; interface CountProps { data: { title: string; number: string | number }[]; style?: StyleProp; } const CountComponent = (props: CountProps) => { return ( {props.data?.map((item, index) => ( {item.title} {item.number} ))} ); }; const styles = StyleSheet.create({ container: { backgroundColor: "#FFB645", padding: 16, borderRadius: 20, display: "flex", flexDirection: "column", justifyContent: "space-between", }, item: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", paddingVertical: 8 }, title: { color: "#4C320C", fontWeight: "700", fontSize: 14, }, number: { color: "#fff", fontWeight: "700", fontSize: 32, textAlign: 'right', flex: 1, paddingTop: 8 } }) export default CountComponent;