parent
65d4cf7cd1
commit
6b0565bf94
After Width: | Height: | Size: 941 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 939 B |
@ -1,44 +1,93 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View, StyleSheet} from 'react-native';
|
import {View, StyleSheet, ScrollView, useWindowDimensions, Text} from 'react-native';
|
||||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
import {SafeAreaProvider } from 'react-native-safe-area-context';
|
||||||
|
import {LinearGradient} from 'expo-linear-gradient';
|
||||||
import TopBar from '../components/TopBar';
|
import TopBar from '../components/TopBar';
|
||||||
import RecipeElementReduce from '../components/RecipeElementReduce';
|
import RecipeElementReduce from '../components/RecipeElementReduce';
|
||||||
|
import ListWithoutSelect from '../components/ListWithoutSelect';
|
||||||
|
import ValidateButton from '../components/ValidateButton';
|
||||||
|
|
||||||
export default function RecipeDetails(props) {
|
export default function RecipeDetails(props) {
|
||||||
|
const ing = [{value: "Chocolate"}, {value: "Milk"}, {value: "Eggs"}, {value: "Flour"}]
|
||||||
|
const ute = [{value: "Spoon (3cl)"}, {value: "Whisk"}, {value: "Oven"}]
|
||||||
|
const ste = [
|
||||||
|
{value: "1. Break the eggs and whisk them. Add the flour."},
|
||||||
|
{value: "2. Melt the chocolate in the microwave. Add it to the eggs."},
|
||||||
|
{value: "3. Put the cake in the oven. 40 minutes, 180 degrees."},
|
||||||
|
{value: "4. Clean the utensils."}
|
||||||
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaProvider>
|
<SafeAreaProvider>
|
||||||
<TopBar title="Recipe Detail"/>
|
<TopBar title="Recipe Detail"/>
|
||||||
<View style={styles.page}>
|
<ScrollView>
|
||||||
<RecipeElementReduce
|
<LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}>
|
||||||
title={props.title}
|
<View style={{marginTop: "6%"}}>
|
||||||
number={props.number}
|
<RecipeElementReduce title="Meat Stick" number="63" duration="15 minutes"/>
|
||||||
duree={props.duree}/>
|
</View>
|
||||||
</View>
|
<View style={styles.separator}/>
|
||||||
|
<View style={styles.background}>
|
||||||
|
<View style={styles.filterBar}>
|
||||||
|
<Text style={styles.filters}>Preparation</Text>
|
||||||
|
</View>
|
||||||
|
<ListWithoutSelect title="Ingredients" content={ing}></ListWithoutSelect>
|
||||||
|
<View style={{marginTop: "3%"}}/>
|
||||||
|
<ListWithoutSelect title="Utensils" content={ute}></ListWithoutSelect>
|
||||||
|
<View style={{marginTop: "3%"}}/>
|
||||||
|
</View>
|
||||||
|
<View style={styles.separator}/>
|
||||||
|
<View style={styles.background}>
|
||||||
|
<View style={styles.filterBar}>
|
||||||
|
<Text style={styles.filters}>Cooking</Text>
|
||||||
|
</View>
|
||||||
|
<ListWithoutSelect title="Steps" content={ste}></ListWithoutSelect>
|
||||||
|
<View style={{marginTop: "3%"}}/>
|
||||||
|
</View>
|
||||||
|
<View style={{marginBottom: "20%"}}/>
|
||||||
|
</LinearGradient>
|
||||||
|
</ScrollView>
|
||||||
</SafeAreaProvider>
|
</SafeAreaProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
page: {
|
linearGradient: {
|
||||||
flex: 1,
|
width: "100%",
|
||||||
backgroundColor: '#59BDCD',
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: "center",
|
||||||
display: 'flex',
|
justifyContent: "flex-start"
|
||||||
flexWrap: 'wrap',
|
},
|
||||||
padding: 20,
|
separator: {
|
||||||
|
marginTop: "6%",
|
||||||
|
},
|
||||||
|
|
||||||
|
background: {
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
borderRadius: 20,
|
||||||
|
backgroundColor: '#F2F0E4',
|
||||||
|
padding: "3%",
|
||||||
|
marginHorizontal: "3%",
|
||||||
|
},
|
||||||
|
|
||||||
|
filterBar: {
|
||||||
|
flexDirection: "row",
|
||||||
|
width: "85%",
|
||||||
|
paddingTop: "3%",
|
||||||
|
paddingBottom: "2%",
|
||||||
|
alignItems: "flex-end",
|
||||||
|
justifyContent: "center",
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
fontSize: 20,
|
||||||
|
color: '#ACA279',
|
||||||
|
flex: 1,
|
||||||
},
|
},
|
||||||
element: {
|
nbSelected: {
|
||||||
marginTop: 20,
|
fontSize: 11,
|
||||||
|
color: "#3F3C42",
|
||||||
|
textAlign: "right",
|
||||||
},
|
},
|
||||||
horizontalAlignement: {
|
|
||||||
display: 'flex',
|
|
||||||
height: 30,
|
|
||||||
width: 350,
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'space-around',
|
|
||||||
alignItems: 'center',
|
|
||||||
marginTop: 10,
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in new issue