Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model_react_native #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import AppContainer from './src/navigations/AppNavigation';

import SingIn from './src/screens/SignIn/SignIn'
export default function App() {
return (
<AppContainer />
<AppContainer />
);
}
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "Instafood",
"slug": "instafood-recipes-app",
"description": "React Native Recipes App Demo. Download source code for free at https://www.instamobile.io . You can also check out the Swift version at https://www.iosapptemplates.com and the Kotlin version at https://www.instakotlin.com .",
"description": "",
"privacy": "public",
"platforms": [
"ios",
Expand Down
6 changes: 5 additions & 1 deletion src/navigations/AppNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import DrawerContainer from '../screens/DrawerContainer/DrawerContainer';
import IngredientScreen from '../screens/Ingredient/IngredientScreen';
import SearchScreen from '../screens/Search/SearchScreen';
import IngredientsDetailsScreen from '../screens/IngredientsDetails/IngredientsDetailsScreen';
import SingIn from '../screens/SignIn/SignIn';


const Stack = createStackNavigator();

Expand All @@ -25,6 +27,9 @@ function MainNavigator() {
}
}}
>


<Stack.Screen name='SingIn' component={SingIn} />
<Stack.Screen name='Home' component={HomeScreen} />
<Stack.Screen name='Categories' component={CategoriesScreen}/>
<Stack.Screen name='Recipe' component={RecipeScreen}/>
Expand Down Expand Up @@ -66,4 +71,3 @@ function DrawerStack() {
}


console.disableYellowBox = true;
8 changes: 8 additions & 0 deletions src/screens/DrawerContainer/DrawerContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export default function DrawerContainer(props) {
navigation.closeDrawer();
}}
/>
<MenuButton
title="LOGOUT"
source={require("../../../assets/icons/search.png")}
onPress={() => {
navigation.navigate("SingIn");
navigation.closeDrawer();
}}
/>
</View>
</View>
);
Expand Down
24 changes: 24 additions & 0 deletions src/screens/SignIn/SignIn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React, { useLayoutEffect } from "react";
import { Text, View,TouchableOpacity, TextInput } from "react-native";
import style from './styles'


export default function SingIn({ navigation }) {

return (
<View style={style.container}>
<TextInput style={style.input} />
<TextInput style={style.input} />

<TouchableOpacity
style={style.btn}
onPress={() => {
navigation.navigate("Home");
}}
>
<Text style={style.textbtn}>Press Here</Text>
</TouchableOpacity>

</View>
);
}
38 changes: 38 additions & 0 deletions src/screens/SignIn/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { StyleSheet } from 'react-native';

const styles = StyleSheet.create({
container: {
width: '100%',
height: '100%',
flex: 1,
justifyContent: 'center',
marginHorizontal: 9,
},
input: {
height: 40,
margin: 12,
borderWidth: 2,
borderColor: 'red',
margin: 10,
marginLeft: 35,
width: '80%',
borderRadius: 20,
height: 50,
},
btn: {
width: '100%',
marginVertical: 10,
paddingVertical: 2,
},
textbtn: {
fontWeight: 'bold',
fontSize: 15,
lineHeight: 26,
},
fixToText: {
flexDirection: 'row',
justifyContent: 'space-between',
},
});

export default styles;
11 changes: 8 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2147,9 +2147,14 @@ camelcase@^5.0.0, camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==

caniuse-lite@^1.0.30001181:
version "1.0.30001202"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001202.tgz#4cb3bd5e8a808e8cd89e4e66c549989bc8137201"
integrity sha512-ZcijQNqrcF8JNLjzvEiXqX4JUYxoZa7Pvcsd9UD8Kz4TvhTonOSNRsK+qtvpVL4l6+T1Rh4LFtLfnNWg6BGWCQ==
version "1.0.30001319"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz"
integrity sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==

caniuse-lite@^1.0.30001319:
version "1.0.30001319"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz#eb4da4eb3ecdd409f7ba1907820061d56096e88f"
integrity sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==

capture-exit@^2.0.0:
version "2.0.0"
Expand Down