Created
January 28, 2016 16:10
-
-
Save ammark47/66b71e96a3394387cdf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
*/ | |
'use strict'; | |
var Auth0Lock = require('react-native-lock-ios'); | |
var lock = new Auth0Lock({clientId: 'redacted', domain: 'redacted'}); | |
import React, { | |
Image, | |
AppRegistry, | |
Component, | |
StyleSheet, | |
TextInput, | |
Text, | |
View | |
} from 'react-native'; | |
import AwesomeButton from 'react-native-awesome-button'; | |
import styles from '../Styles/styles'; | |
class LogIn extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
buttonState: 'idle' | |
} | |
this.handleLogIn = this.handleLogIn.bind(this); | |
} | |
handleLogIn() { | |
console.log('hello'); | |
// lock.show({}, (err, profile, token) => { | |
// if (err) { | |
// console.log(err); | |
// return; | |
// } | |
// // Authentication worked! | |
// console.log('Logged in with Auth0!'); | |
// }); | |
} | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Image style={styles.bg} source={require('../Assets/homeFood.jpg')} /> | |
<View style={styles.header}> | |
<Image style={styles.mark} source={{uri: 'http://i.imgur.com/da4G0Io.png'}} /> | |
</View> | |
<View style={styles.buttonContainerLogIn}> | |
<AwesomeButton states={{ | |
idle: { | |
text: 'Log In', | |
onPress: this.handleLogIn, | |
backgroundColor: '#1155DD' | |
} | |
}} /> | |
</View> | |
<View style={styles.buttonContainerSignUp}> | |
<AwesomeButton states={{ | |
default: { | |
text: 'Sign Up', | |
backgroundColor: '#ac0000', | |
onPress: this.handleSignUp | |
} | |
}} /> | |
</View> | |
</View> | |
) | |
} | |
} | |
export default LogIn; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment