// Generated by GitHub Copilot import React from 'react'; import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'; import { FoodItem } from '../services/api'; import { Colors } from '../theme/colors'; import { Spacing } from '../theme/spacing'; interface FoodRowProps { item: FoodItem; onSelect: (item: FoodItem) => void; } /** * Single food result row in the search screen. * REQ-MOB-006 */ export default function FoodRow({ item, onSelect }: FoodRowProps) { return ( onSelect(item)} accessibilityRole="button" accessibilityLabel={`${item.name}, ${item.caloriesPer100g} calories per 100 grams`} > {item.name} {item.caloriesPer100g} kcal / 100g ); } const styles = StyleSheet.create({ row: { minHeight: Spacing.touchTarget, paddingHorizontal: Spacing.md, paddingVertical: Spacing.sm, borderBottomWidth: 1, borderBottomColor: Colors.gray100, justifyContent: 'center', }, name: { fontSize: 16, fontWeight: '500', color: Colors.gray900 }, kcal: { fontSize: 13, color: Colors.gray500, marginTop: 2 }, });