Skip to content

Commit

Permalink
Created recipe screen
Browse files Browse the repository at this point in the history
novaisea committed Mar 17, 2021
1 parent 91b2601 commit cca59d1
Showing 6 changed files with 102 additions and 73 deletions.
41 changes: 37 additions & 4 deletions components/Recipe1.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,50 @@
import React, { Component } from 'react';
import { Button, View, Text } from 'react-native';
import { Button, View, Text, Image, ScrollView } from 'react-native';
import {createAppContainer } from "react-navigation";
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from 'react-navigation-stack';
import {createBottomTabNavigator} from 'react-navigation-tabs';



export default class Recipe1 extends Component {
state = {
check: false,
}

handleChange = () => {
console.log("check!")
}
render() {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>Recipe Screen</Text>
<View style={{ flex: 1, justifyContent: 'top', padding:10 }}>
<Image style={{width: 395, height: 280}}
source={require('../images/recipe1.png')} />
<Text style={{fontWeight: "bold", textAlign: 'center',fontSize: 18}}>{"\n"}Recipe Name {"\n"}</Text>

<ScrollView>
<Text style={{fontSize: 14}}>Preparation Time: 20 - 30 Minutes {"\n"}
Dificulty: Beginner {"\n"}
Servings: 2 Portions {"\n"}
</Text>

<Text style={{fontWeight: "bold", fontSize: 18}}>Ingredients {"\n"}</Text>

<Text style={{fontSize: 14}}>1 large white onion{"\n"}
2 large handfuls of kale{"\n"}
2 tbsp olive oil{"\n"}
400g floury potatoes, cubed but not peeled{"\n"}
2 tsp mild curry powder{"\n"}
1 tsp ground cumin{"\n"}
½ tsp turmeric{"\n"}
Sea salt and black pepper to taste{"\n"}
</Text>


<Text>Do you like React Native?</Text>

</ScrollView>
</View>
)
}
}
}
Binary file added images/recipe1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/recipe2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 59 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
"@react-navigation/bottom-tabs": "^5.11.8",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"all": "^0.0.0",
"expo": "~40.0.0",
"expo-status-bar": "~1.0.3",
"react": "16.13.1",
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -1913,6 +1913,11 @@ accepts@~1.3.5, accepts@~1.3.7:
mime-types "~2.1.24"
negotiator "0.6.2"

all@^0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/all/-/all-0.0.0.tgz#fb2aa75d4759d40e39ecbb118fabf0cc11ff554f"
integrity sha1-+yqnXUdZ1A457LsRj6vwzBH/VU8=

anser@^1.4.9:
version "1.4.10"
resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.10.tgz#befa3eddf282684bd03b63dcda3927aef8c2e35b"

0 comments on commit cca59d1

Please sign in to comment.