import React from 'react'; import { View, Text } from 'react-native'; import { useTheme } from '~/features/theme/ThemeProvider'; import Icon from '~/components/atoms/Icon'; import colors from '~/tailwind.config.js'; interface StatRowProps { title: string; value: string; icon: string; subtitle?: string; } /** * Reusable row component for displaying a statistic with icon, title and value */ const StatRow: React.FC = ({ title, value, icon, subtitle }) => { const { isDark, themeVariant } = useTheme(); const textColor = isDark ? '#FFFFFF' : '#000000'; const textSecondaryColor = isDark ? '#CCCCCC' : '#666666'; const primaryColor = isDark ? (colors as any).theme?.extend?.colors?.dark?.[themeVariant]?.primary : (colors as any).theme?.extend?.colors?.[themeVariant]?.primary; const borderColor = isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'; return ( {title} {subtitle && ( {subtitle} )} {value} ); }; export default StatRow;