Dropdown List ingredient Selection Page
continuous-integration/drone/push Build is passing Details

pull/20/head
Louison PARANT 2 years ago
parent e38cfc8ce4
commit eef6c6fb5a

@ -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',
}, },

@ -167,7 +167,7 @@ export default function HomePage({ navigation, props }) {
<Pressable onPress={decreaseCounter}> <Pressable onPress={decreaseCounter}>
<Image source={bracketLeft} style={{width: 40, height: 40, resizeMode: "contain"}} tintColor={colors.carrouselText}/> <Image source={bracketLeft} style={{width: 40, height: 40, resizeMode: "contain"}} tintColor={colors.carrouselText}/>
</Pressable> </Pressable>
<FoodElementText title={ingredientList[cpt].title}/> <FoodElementText title={ingredientList[cpt].title} mainColour={colors.carrouselBackground} secondaryColour={colors.cardDetail}/>
<Pressable onPress={increaseCounter}> <Pressable onPress={increaseCounter}>
<Image source={bracketRight} style={{width: 40, height: 40, resizeMode: "contain"}} tintColor={colors.carrouselText} /> <Image source={bracketRight} style={{width: 40, height: 40, resizeMode: "contain"}} tintColor={colors.carrouselText} />
</Pressable> </Pressable>

@ -36,6 +36,7 @@ export interface Theme {
buttonMain: string, buttonMain: string,
yesButton: string, yesButton: string,
letterFilter: string, letterFilter: string,
foodElementBorder: string,
} }
export const LightTheme : Theme = { export const LightTheme : Theme = {
@ -64,6 +65,7 @@ export const LightTheme : Theme = {
buttonMain: Ecru, buttonMain: Ecru,
yesButton: Moonstone, yesButton: Moonstone,
letterFilter: Moonstone, letterFilter: Moonstone,
foodElementBorder: Jet,
} }
export const DarkTheme : Theme = { export const DarkTheme : Theme = {
@ -92,5 +94,6 @@ export const DarkTheme : Theme = {
buttonMain: CarolinaBlue, buttonMain: CarolinaBlue,
yesButton: CarolinaBlue, yesButton: CarolinaBlue,
letterFilter: CarolinaBlue, letterFilter: CarolinaBlue,
foodElementBorder: CarolinaBlue,
} }

Loading…
Cancel
Save