Skip to content

Instantly share code, notes, and snippets.

krissanawat101 krissnawat

Block or report user

Report or block krissnawat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View InputField.js
<Text style={styles.ForgotPasswordSubHeading}>
Enter your email to find account.
</Text>
<InputField
customStyle={{ marginTop: 100 }}
textColor={colors.white}
labelText="EMAIL ADDRESS"
labelTextSize={14}
labelColor={colors.white}
borderBottomColor={colors.white}
View navigationOptions.js
static navigationOptions = ({ navigation }) => ({
headerStyle: {
borderBottomWidth: 0,
elevation: 0
},
headerTransparent: true,
headerTintColor: colors.white
});
View StyleSheet.js
const styles = StyleSheet.create({
wrapper: {
display: "flex",
flex: 1,
backgroundColor: colors.green01
},
form: {
marginTop: 90,
paddingLeft: 20,
paddingRight: 20,
View KeyboardAvoidingView.js
render() {
return (
<KeyboardAvoidingView
style={[{ backgroundColor: background }, styles.wrapper]}
behavior="padding"
><View style={styles.scrollViewWrapper}>
<Text style={styles.forgotPasswordHeading}>
Forgot your password?
</Text>
<Text style={styles.forgotPasswordSubheading}>
View import.js
import React, { Component } from 'react';
import {
View,
Text,
KeyboardAvoidingView,
ScrollView,
} from 'react-native';
import colors from '../styles/colors';
import InputField from '../components/form/InputField';
import NextArrowButton from '../components/buttons/NextArrowButton';
View import package.js
StyleSheet,
Alert
} from "react-native";
import firebase from "react-native-firebase";
View submitEmail.js
submitEmail = () => {
firebase
.auth()
.sendPasswordResetEmail(this.state.email)
.then(function() {
Alert.alert("email sent");
})
.catch(function(error) {
Alert.alert(error.message);
});
View event handle.js
<InputField
customStyle={{ marginTop: 100 }}
textColor={colors.white}
labelText="EMAIL ADDRESS"
labelTextSize={14}
labelColor={colors.white}
borderBottomColor={colors.white}
inputType="email"
onChangeText={email => this.handleEmailChange(email)}
/>
View handleEmailChange.js
handleEmailChange = email => {
this.setState({ email: email });
};
View new state.js
constructor(props) {
super(props);
this.state = {
emailAddress: ""
};
}
You can’t perform that action at this time.