Skip to content

Commit

Permalink
Refactor FoodListItem component styling
Browse files Browse the repository at this point in the history
  • Loading branch information
marksikaundi committed Mar 10, 2024
1 parent a727f8b commit d60f288
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/components/FoodListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ import { AntDesign } from "@expo/vector-icons";

const FoodListItem = ({ item }) => {
return (
<View
style={{
backgroundColor: "gainsboro",
padding: 10,
borderRadius: 5,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
}}
>
<View style={styles.container}>
<View style={{ flex: 1, gap: 5 }}>
<Text style={{ fontWeight: "bold", fontSize: 16 }}>{item.label}</Text>
<Text style={{ color: "dimgray" }}>
Expand All @@ -24,4 +15,15 @@ const FoodListItem = ({ item }) => {
);
};

const styles = StyleSheet.create({
container: {
backgroundColor: "gainsboro",
padding: 10,
borderRadius: 5,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
},
});

export default FoodListItem;

0 comments on commit d60f288

Please sign in to comment.