Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import {
- AppRegistry,
- StyleSheet,
- Text,
- ScrollView,
- TextInput,
- View ,
- } from 'react-native';
- var styles = require('./Style/customStyle');
- import Button from 'react-native-button';
- import RadioButton from 'react-native-radio-button'
- class AwesomeProject extends Component {
- constructor(props){
- super(props)
- this.state = {
- username: '',
- password: '',
- }
- }
- render() {
- return (
- <ScrollView style={styles.content}>
- <View style={styles.content}>
- <Text style={styles.welcome}>
- Create Account
- </Text>
- <Text style={styles.textStyle}>
- Name
- </Text>
- <TextInput
- style={styles.textInputStyle}
- placeholder="Enter Name"
- returnKeyLabel = {"next"}
- onChangeText={(text) => this.setState({text})}
- />
- <Button style={styles.buttonStyle}>
- Submit
- </Button>
- </View>
- </ScrollView>
- );
- }
- }
- AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
- <Button
- style={styles.textInputStyle}
- onPress={() => console.log(this.state.username)}>
- Submit
- </Button>
- <TextInput
- style={styles.textInputStyle}
- placeholder="Enter Name"
- returnKeyLabel = {"next"}
- onChangeText={(text) => this.setState({text})}
- />
- <Button
- onPress={() => function }>
- class AwesomeProject extends Component {
- constructor(props){
- super(props)
- this.state = {
- username: '',
- password: '',
- }
- }
- _handlePress() {
- console.log(this.state.username);
- console.log(this.state.password);
- }
- render() {
- return (
- <ScrollView style={styles.content}>
- <View style={styles.content}>
- <Text style={styles.welcome}>
- Create Account
- </Text>
- <Text style={styles.textStyle}>
- Name
- </Text>
- <TextInput
- style={styles.textInputStyle}
- placeholder="Enter Name"
- returnKeyLabel = {"next"}
- onChangeText={(text) => this.setState({username:text})}
- />
- <Text style={styles.textStyle}>
- Name
- </Text>
- <TextInput
- style={styles.textInputStyle}
- placeholder="Enter Name"
- returnKeyLabel = {"next"}
- onChangeText={(text) => this.setState({password:text})}
- />
- <Button
- onPress={() => this._handlePress()}
- style={styles.buttonStyle}>
- Submit
- </Button>
- </View>
- </ScrollView>
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement