From e393cad4b842ccf67b1a9f03d574937e1278860a Mon Sep 17 00:00:00 2001 From: Lucie Bedouret Date: Mon, 17 Oct 2022 17:44:51 +0200 Subject: [PATCH] ADD: composant textInput, SignIn et SignUp --- bob_party/src/components/CustomTextInput.tsx | 30 +++++++++++++++++++ .../src/components/style/TextInput.style.js | 19 ++++++++++++ bob_party/src/screens/SignIn.tsx | 29 ++++++++++++++++++ bob_party/src/screens/SignUp.tsx | 30 +++++++++++++++++++ bob_party/src/screens/style/SignIn.style.js | 27 +++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 bob_party/src/components/CustomTextInput.tsx create mode 100644 bob_party/src/components/style/TextInput.style.js create mode 100644 bob_party/src/screens/SignIn.tsx create mode 100644 bob_party/src/screens/SignUp.tsx create mode 100644 bob_party/src/screens/style/SignIn.style.js diff --git a/bob_party/src/components/CustomTextInput.tsx b/bob_party/src/components/CustomTextInput.tsx new file mode 100644 index 0000000..20ad69f --- /dev/null +++ b/bob_party/src/components/CustomTextInput.tsx @@ -0,0 +1,30 @@ +import { FC, ReactNode } from "react" +import { View, TextInput,Text } from "react-native" +import React from "react" +import { trace } from "console" +import { Game } from "../core/game" + +/* + Importing the correct stylesheet +*/ +import styles from "./style/TextInput.style" + +export const CustomTextInput : +/* + * game : Game that must be displayed + * nav : tool needed to allow the navigation between the screens +*/ +FC<{placeholder:String,text:String}> = +({placeholder, text}) => +{ + const [value, onChangeText] = React.useState(placeholder); + return ( + + {text} + + + ) +} \ No newline at end of file diff --git a/bob_party/src/components/style/TextInput.style.js b/bob_party/src/components/style/TextInput.style.js new file mode 100644 index 0000000..70e38be --- /dev/null +++ b/bob_party/src/components/style/TextInput.style.js @@ -0,0 +1,19 @@ +import { StyleSheet } from 'react-native'; + +export default StyleSheet.create({ + input: { + height: 40, + width: 250, + marginBottom:12, + borderWidth: 1, + padding: 10, + alignContent:'center', + backgroundColor:'white' + }, + section:{ + fontSize:15, + alignSelf:'left', + marginLeft:10, + color:'white', + }, +}) \ No newline at end of file diff --git a/bob_party/src/screens/SignIn.tsx b/bob_party/src/screens/SignIn.tsx new file mode 100644 index 0000000..953a3e2 --- /dev/null +++ b/bob_party/src/screens/SignIn.tsx @@ -0,0 +1,29 @@ +import { StatusBar } from 'expo-status-bar' +import { StyleSheet, View, ImageSourcePropType, Pressable, Text} from 'react-native' +import React from 'react'; +import stylesScreen from './style/screens.style' +import { TextInput } from 'react-native-gesture-handler'; +import { CustomTextInput } from '../components/CustomTextInput'; +import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice'; + +import styles from "./style/SignIn.style" + +function SignIn(props: { navigation: any; }) { + const { navigation } = props + return ( + + + + + + Se connecter + + + Pas de compte? Inscrivez vous ! + + + + ); +} + +export default SignIn diff --git a/bob_party/src/screens/SignUp.tsx b/bob_party/src/screens/SignUp.tsx new file mode 100644 index 0000000..a72a638 --- /dev/null +++ b/bob_party/src/screens/SignUp.tsx @@ -0,0 +1,30 @@ +import { StatusBar } from 'expo-status-bar' +import { StyleSheet, View, ImageSourcePropType, Pressable, Text} from 'react-native' +import React from 'react'; +import stylesScreen from './style/screens.style' +import { TextInput } from 'react-native-gesture-handler'; +import { CustomTextInput } from '../components/CustomTextInput'; +import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice'; + +import styles from "./style/SignIn.style" + +function SignUp(props: { navigation: any; }) { + const { navigation } = props + return ( + + + + + + + + + + S'inscrire + + + + ); +} + +export default SignUp diff --git a/bob_party/src/screens/style/SignIn.style.js b/bob_party/src/screens/style/SignIn.style.js new file mode 100644 index 0000000..e8abeb6 --- /dev/null +++ b/bob_party/src/screens/style/SignIn.style.js @@ -0,0 +1,27 @@ +import { StyleSheet } from "react-native"; + +export default StyleSheet.create({ + button: { + alignItems: 'center', + justifyContent: 'center', + height: 50, + width: 225, + marginTop: '15%', + margin:'5%', + borderRadius: 10, + elevation: 3, + backgroundColor: '#0085FF', + }, + text: { + fontSize: 16, + lineHeight: 21, + fontWeight: 'bold', + letterSpacing: 0.25, + color: 'white', + }, + signup:{ + fontSize:15, + color:'white', + textDecorationLine:"underline", + }, + }); \ No newline at end of file