parent
0adc05c2f7
commit
e393cad4b8
@ -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 (
|
||||
<View>
|
||||
<Text style={styles.section}>{text}</Text>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
onChangeText= {onChangeText}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
}
|
@ -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',
|
||||
},
|
||||
})
|
@ -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 (
|
||||
<View style={stylesScreen.container}>
|
||||
<View style={stylesScreen.bodyCenter}>
|
||||
<CustomTextInput placeholder={""} text="ID"/>
|
||||
<CustomTextInput placeholder={""} text="Password"/>
|
||||
<Pressable style={styles.button} onPress={navigation.navigate('Home')}>
|
||||
<Text style={styles.text}>Se connecter</Text>
|
||||
</Pressable>
|
||||
<Pressable>
|
||||
<Text style={styles.signup}>Pas de compte? Inscrivez vous !</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
export default SignIn
|
@ -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 (
|
||||
<View style={stylesScreen.container}>
|
||||
<View style={stylesScreen.bodyCenter}>
|
||||
<CustomTextInput placeholder={""} text="Pseudo"/>
|
||||
<CustomTextInput placeholder={""} text="Mot de passe"/>
|
||||
<CustomTextInput placeholder={""} text="Mot de passe"/>
|
||||
<CustomTextInput placeholder={""} text="Nationalité"/>
|
||||
<CustomTextInput placeholder={""} text="Date de naisance"/>
|
||||
<CustomTextInput placeholder={""} text="Sexe"/>
|
||||
<Pressable style={styles.button} onPress={navigation.navigate('Home')}>
|
||||
<Text style={styles.text}>S'inscrire</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
export default SignUp
|
@ -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",
|
||||
},
|
||||
});
|
Loading…
Reference in new issue