Skip to content

Commit

Permalink
Merge pull request #65 from ES2-UFPI/danillo#30
Browse files Browse the repository at this point in the history
close issue #30
  • Loading branch information
giselesousar authored Jun 15, 2021
2 parents 318014c + 82c9f70 commit e68bf92
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
Binary file added frontend/src/assets/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions frontend/src/components/avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import React from 'react';
import { Text, View, Image, StyleSheet, Button } from 'react-native';
import { Dimensions } from 'react-native'

const SCREEN_WIDTH = Dimensions.get("window").width;
const PROFILE_PICTURE_DIMENSION = SCREEN_WIDTH * 0.3;

const styles = StyleSheet.create({
componentContainer: {
alignItems: 'center',
},
profilePicture: {
width: PROFILE_PICTURE_DIMENSION,
height: PROFILE_PICTURE_DIMENSION,
borderRadius: PROFILE_PICTURE_DIMENSION / 2,
},
name: {
color: '#FCFCFF',
fontSize: 24,
fontWeight: 'bold',
},
email: {
color: '#FCFCFF',
fontSize: 14,
textDecorationLine: 'underline'

},
labelText: {
color: '#FCFCFF',
fontSize: 14,
fontWeight: 'bold',
},
label: {
backgroundColor: '#61C08C',
borderWidth: 2,
borderColor: '#FCFCFF',
borderRadius: 30,
alignItems: 'center',
padding: 2,
position: 'absolute',
},
profilePictureAndLabelContainer: {
paddingBottom: 15,
justifyContent: 'flex-end',
alignItems: 'center'
},
textContainer: {
alignItems: 'center',
}
});

const Avatar = (props: any) => {
return (
<View style={styles.componentContainer}>
<View style={styles.profilePictureAndLabelContainer}>
<Image
style={styles.profilePicture}
source={props.profilePicture}
/>
{props.isProfissional ? <View style={styles.label}>
<Text style={styles.labelText}>PROFISSIONAL</Text>
</View> : <></>}
</View>
<View style={styles.textContainer}>
<Text style={styles.name}>{props.name}</Text>
<Text style={styles.email}>{props.email}</Text>
</View >
</View >

)
}
export default Avatar;

0 comments on commit e68bf92

Please sign in to comment.