Feed showing posts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import React, { useState } from 'react';
|
||||
import { Text, View, TextInput, Button } from 'react-native';
|
||||
import { Text, View, TextInput, Button, StyleSheet } from 'react-native';
|
||||
import API from './../API.js';
|
||||
|
||||
|
||||
@@ -9,31 +9,27 @@ let LoginForm = ()=>{
|
||||
let [password, setPassword] = useState('');
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Text>Log in</Text>
|
||||
<View style={styles.mainView}>
|
||||
<Text>Log in</Text>
|
||||
<TextInput
|
||||
style={{
|
||||
height: 40,
|
||||
width: 200,
|
||||
borderColor: 'gray',
|
||||
borderWidth: 1
|
||||
}}
|
||||
style={styles.input}
|
||||
onChangeText={text => setEmail(text)}
|
||||
defaultValue={email}
|
||||
placeholder=" email"
|
||||
autoCapitalize='none'
|
||||
autoComplete='email'
|
||||
autoCorrect={false}
|
||||
/>
|
||||
<TextInput
|
||||
style={{
|
||||
height: 40,
|
||||
width: 200,
|
||||
borderColor: 'gray',
|
||||
borderWidth: 1
|
||||
}}
|
||||
style={styles.input}
|
||||
onChangeText={text => setPassword(text)}
|
||||
defaultValue={password}
|
||||
placeholder=" password"
|
||||
textContentType="password"
|
||||
secureTextEntry={true}
|
||||
autoCapitalize='none'
|
||||
autoComplete='email'
|
||||
autoCorrect={false}
|
||||
/>
|
||||
<Button
|
||||
onPress={async () => {
|
||||
@@ -47,3 +43,20 @@ let LoginForm = ()=>{
|
||||
}
|
||||
|
||||
export default LoginForm;
|
||||
|
||||
const styles = StyleSheet.create ({
|
||||
mainView:{
|
||||
flex: 1,
|
||||
flexDirection:'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: 'rgba(255, 0, 255, 1.0)',
|
||||
},
|
||||
input: {
|
||||
height: 40,
|
||||
width: 300,
|
||||
borderColor: 'gray',
|
||||
borderWidth: 1,
|
||||
margin: 10
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user