diff --git a/LeftOvers/App.js b/LeftOvers/App.js
index 20e452d..1d4b070 100644
--- a/LeftOvers/App.js
+++ b/LeftOvers/App.js
@@ -1,12 +1,22 @@
import React from 'react';
-import { StyleSheet, Text, View, Alert } from 'react-native';
+import { StyleSheet, View } from 'react-native';
import RecipeElementImage from './components/RecipeElementImage';
+const generateImageList = () => {
+ const imageList = [];
+ const meat = '../assets/images/meat.png';
+ for (let i = 0; i < 5; i++) {
+ imageList.push(meat);
+ }
+ return imageList;
+};
+
export default function App() {
+ const imageList = [];
return (
-
+
);
}
diff --git a/LeftOvers/components/FoodElementText.tsx b/LeftOvers/components/FoodElementText.tsx
index 5f3cf9e..2e6062c 100644
--- a/LeftOvers/components/FoodElementText.tsx
+++ b/LeftOvers/components/FoodElementText.tsx
@@ -4,7 +4,15 @@ import Separator from '../components/Separator';
import plus from '../assets/images/plus.png';
import moins from '../assets/images/minus.png';
-export default function FoodElementText(props) {
+
+
+interface foodElementImageProps {
+ source : string
+ title : string
+}
+
+
+export default function FoodElementText(props : any) {
return (
@@ -27,7 +35,7 @@ const styles = StyleSheet.create({
height: 60,
borderRadius: 5,
elevation: 3,
- backgroundColor: '#ACA279',
+ backgroundColor: '#E3DEC9',
},
text: {
fontSize: 15,
diff --git a/LeftOvers/components/RecipeElementImage.tsx b/LeftOvers/components/RecipeElementImage.tsx
index 68bbf4d..104bbbc 100644
--- a/LeftOvers/components/RecipeElementImage.tsx
+++ b/LeftOvers/components/RecipeElementImage.tsx
@@ -3,13 +3,17 @@ import {StyleSheet,Pressable, Text, View, Image} from 'react-native';
import brochette from '../assets/images/brochette.png';
import Union_left from '../assets/images/Union_left.png';
import Union_right from '../assets/images/Union_right.png';
-import meat from '../assets/images/meat.png';
import background from '../assets/images/Background.png';
+interface recipeElementImageProps {
+ number : number
+ title : string
+ description : string
+ imageList : string[]
+}
-
-export default function RecipeElementImage(props) {
+export default function RecipeElementImage(props : any) {
return (
@@ -19,19 +23,20 @@ export default function RecipeElementImage(props) {
{props.description}
-
-
+ {props.imageList.length > 0 ? (
+
+
Ingredients
-
-
+
+
+ ) : null}
+
-
-
-
-
-
+ {props.imageList.length > 0 && props.imageList.map((source, index) => (
+
+ ))}
-
+
);
@@ -42,10 +47,10 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
width : 250,
- height: 370,
+ height: 350,
borderRadius: 40,
elevation: 3,
- backgroundColor: '#ACA279',
+ backgroundColor: '#E3DEC9',
},
text: {
fontSize: 14,
@@ -71,7 +76,7 @@ const styles = StyleSheet.create({
},
view: {
width : 240,
- height: 360,
+ height: 340,
borderRadius: 40,
elevation: 3,
borderWidth: 2,