@ -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 (
< Pressable style = { styles . button } >
< View style = { styles . view } >
@ -19,19 +23,20 @@ export default function RecipeElementImage(props) {
< View style = { { alignItems : 'center' , justifyContent : 'center' } } >
< Text style = { styles . smallText } > { props . description } < / Text >
< / View >
< View style = { styles . horizontalAlignement } >
< Image source = { Union_left } style = { { width : 70 , height : 4 , marginRight : 6 } } > < / Image >
{ props . imageList . length > 0 ? (
< View style = { styles . horizontalAlignement } >
< Image source = { Union_left } style = { { width : 70 , height : 4 , marginRight : 6 } } / >
< Text style = { styles . smallText } > Ingredients < / Text >
< Image source = { Union_right } style = { { width : 70 , height : 4 , marginLeft : 6 } } > < / Image >
< / View >
< Image source = { Union_right } style = { { width : 70 , height : 4 , marginLeft : 6 } } / >
< / View >
) : null }
< View style = { styles . horizontalAlignement } >
< Image source = { meat } style = { { width : 40 , height : 40 } } / >
< Image source = { meat } style = { { width : 40 , height : 40 } } / >
< Image source = { meat } style = { { width : 40 , height : 40 } } / >
< Image source = { meat } style = { { width : 40 , height : 40 } } / >
< Image source = { meat } style = { { width : 40 , height : 40 } } / >
{ props . imageList . length > 0 && props . imageList . map ( ( source , index ) = > (
< Image key = { index } source = { source } style = { { width : 40 , height : 40 } } / >
) ) }
< / View >
< Image source = { background } style = { { width : 210 , height : 20 , marginTop : 20 } } > < / Image >
< Image source = { background } style = { { width : 210 , height : 20 , marginTop : 300 , position : 'absolute' } } > < / Image >
< / View >
< / Pressable >
) ;
@ -42,10 +47,10 @@ const styles = StyleSheet.create({
alignItems : 'center' ,
justifyContent : 'center' ,
width : 250 ,
height : 3 7 0,
height : 3 5 0,
borderRadius : 40 ,
elevation : 3 ,
backgroundColor : '# ACA27 9',
backgroundColor : '# E3DEC 9',
} ,
text : {
fontSize : 14 ,
@ -71,7 +76,7 @@ const styles = StyleSheet.create({
} ,
view : {
width : 240 ,
height : 3 6 0,
height : 3 4 0,
borderRadius : 40 ,
elevation : 3 ,
borderWidth : 2 ,