import React, { Component } from 'react';
import { Text, StyleSheet, View, Button,TextInput,input } from 'react-native';
import ImageDetail from '../components/ImageDetail';
class LoginPage extends Component {
constructor() {
super();
this.state = {
username: '',
password: '',
error: '',
};
this.handlePassChange = this.handlePassChange.bind(this);
this.handleUserChange = this.handleUserChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.dismissError = this.dismissError.bind(this);
}
dismissError() {
this.setState({ error: '' });
}
handleSubmit(evt) {
evt.preventDefault();
if (!this.state.username) {
return this.setState({ error: 'Username is required' });
}
if (!this.state.password) {
return this.setState({ error: 'Password is required' });
}
return this.setState({ error: '' });
}
handleUserChange(evt) {
this.setState({
username: evt.target.value,
});
};
handlePassChange(evt) {
this.setState({
password: evt.target.value,
});
}
render() {
Image Screen
return (
User Name
Password
);
}
}
const styles = StyleSheet.create({
buttonSytle: {
margin: 25,
padding: 25,
},
buttonSytle1: {
margin: 25,
padding: 25,
},
inputSytle: {
borderColor: 'black',
padding: 25,
margin: 25
}
});
export default LoginPage;