|
|
@ -6,6 +6,8 @@ import ColorContext from '../theme/ColorContext';
|
|
|
|
|
|
|
|
|
|
|
|
interface FoodElementTextProps {
|
|
|
|
interface FoodElementTextProps {
|
|
|
|
title : string
|
|
|
|
title : string
|
|
|
|
|
|
|
|
mainColour: string
|
|
|
|
|
|
|
|
secondaryColour: string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const componentHeight = 60;
|
|
|
|
const componentHeight = 60;
|
|
|
@ -21,7 +23,7 @@ export default function FoodElementText(props : any) {
|
|
|
|
justifyContent: 'center',
|
|
|
|
justifyContent: 'center',
|
|
|
|
width: "80%",
|
|
|
|
width: "80%",
|
|
|
|
borderRadius: 5,
|
|
|
|
borderRadius: 5,
|
|
|
|
backgroundColor: colors.carrouselBackground,
|
|
|
|
backgroundColor: props.mainColour ? props.mainColour : colors.ingredientBackground,
|
|
|
|
marginHorizontal: "3%",
|
|
|
|
marginHorizontal: "3%",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
text: {
|
|
|
|
text: {
|
|
|
@ -42,7 +44,7 @@ export default function FoodElementText(props : any) {
|
|
|
|
height: 50,
|
|
|
|
height: 50,
|
|
|
|
borderRadius: 5,
|
|
|
|
borderRadius: 5,
|
|
|
|
borderWidth: 2,
|
|
|
|
borderWidth: 2,
|
|
|
|
borderColor: colors.cardDetail,
|
|
|
|
borderColor: props.secondaryColour ? props.secondaryColour : colors.foodElementBorder,
|
|
|
|
flexDirection: 'row',
|
|
|
|
flexDirection: 'row',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
},
|
|
|
|
},
|
|
|
|