-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve login page and added contextual message to signup
- Loading branch information
1 parent
463eadd
commit 7fa1110
Showing
5 changed files
with
63 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from 'react'; | ||
import { TouchableOpacity, Text, StyleSheet, View } from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import Icon from 'react-native-vector-icons/FontAwesome'; | ||
|
||
const GoogleButton = ({ buttonType, onPress }) => { | ||
const buttonText = buttonType === 'signin' ? 'Sign In with Google' : 'Sign Up with Google'; | ||
|
||
return ( | ||
<TouchableOpacity style={styles.button} onPress={onPress}> | ||
<View style={styles.iconAndText}> | ||
<Icon name="google" size={20} color="#FFFFFF" style={styles.icon} /> | ||
<Text style={styles.buttonText}>{buttonText}</Text> | ||
</View> | ||
</TouchableOpacity> | ||
); | ||
}; | ||
|
||
GoogleButton.propTypes = { | ||
buttonType: PropTypes.string.isRequired, | ||
onPress: PropTypes.func.isRequired | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
button: { | ||
backgroundColor: '#4285F4', | ||
paddingVertical: 12, | ||
paddingHorizontal: 16, | ||
borderRadius: 4, | ||
alignItems: 'center', | ||
justifyContent: 'center' | ||
}, | ||
buttonText: { | ||
color: '#FFFFFF', | ||
fontSize: 16, | ||
fontWeight: 'bold' | ||
}, | ||
iconAndText: { | ||
flexDirection: 'row', | ||
alignItems: 'center' | ||
}, | ||
icon: { | ||
marginRight: 10 | ||
} | ||
}); | ||
|
||
export default GoogleButton; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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