Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Jpe#header transparente #190

Merged
merged 4 commits into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Components/About/aboutHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const styles = StyleSheet.create({
backgroundColor: "#fff",
marginBottom: 15,
marginTop: 15,
marginLeft: 15,
marginRight: 10,
paddingLeft: 15,
flexDirection: "row"
},
backButton: {
Expand All @@ -44,11 +44,11 @@ const styles = StyleSheet.create({
languagesInfo: {
flex: 1,
fontSize: 22,
textAlign: "center",
textAlign: "left",
backgroundColor: "#fff",
marginLeft: 20,
paddingRight: 20
}
})

export default aboutHeader
export default aboutHeader
4 changes: 2 additions & 2 deletions src/Components/Languages/languagesHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const styles = StyleSheet.create({
backgroundColor: "#fff",
marginBottom: 15,
marginTop: 15,
marginLeft: 15,
paddingLeft: 15,
marginRight: 10,
flexDirection: "row"
},
Expand All @@ -44,7 +44,7 @@ const styles = StyleSheet.create({
languagesInfo: {
flex: 1,
fontSize: 22,
textAlign: "center",
textAlign: "left",
backgroundColor: "#fff",
marginLeft: 20,
paddingRight: 20
Expand Down
59 changes: 59 additions & 0 deletions src/Components/PreviewImage/previewImageHeader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React from "react"

import {
View,
StyleSheet,
Text,
TouchableOpacity,
StatusBar
} from "react-native"
import { Icon } from "react-native-elements"

const previewImageHeader = props => {
const { navigation } = props
const userName = navigation.getParam("name")

return (
<View style={styles.header}>
<StatusBar backgroundColor="#000" barStyle="light-content" />
<View style={styles.headerContent}>
<TouchableOpacity
onPress={() => {
navigation.goBack()
}}
hitSlop={{ top: 20, bottom: 20, left: 20, right: 20 }}
>
<Icon name="ios-arrow-back" color="#fff" type="ionicon" />
</TouchableOpacity>
<Text style={styles.previewImageInfo}>{userName}</Text>
</View>
</View>
)
}

const styles = StyleSheet.create({
header: {
backgroundColor: "#000",
elevation: 5,
marginTop: 0,
fontFamily: "OpenSans"
},
headerContent: {
backgroundColor: "#000",
marginBottom: 15,
marginTop: 15,
marginRight: 10,
paddingLeft: 15,
flexDirection: "row"
},
previewImageInfo: {
flex: 1,
fontSize: 22,
textAlign: "left",
color: "#fff",
backgroundColor: "#000",
marginLeft: 20
}
})

export default previewImageHeader
10 changes: 6 additions & 4 deletions src/Screens/EditPerfil/editperfil.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export default class Conversas extends Component {
<TouchableOpacity
style={styles.back}
onPress={this.handleBackPress}
hitSlop={{ top: 20, bottom: 20, left: 20, right: 20 }}
>
<Icon name="ios-arrow-back" color="#00aced" type="ionicon" />
</TouchableOpacity>
Expand Down Expand Up @@ -338,16 +339,17 @@ const styles = StyleSheet.create({
headerContent: {
justifyContent: "space-between",
alignContent: "center",
marginBottom: 10,
marginLeft: 10,
marginTop: 10,
marginBottom: 15,
marginTop: 15,
marginRight: 10,
paddingLeft: 15,
flexDirection: "row"
},
perfilInfo: {
flex: 1,
fontSize: 22,
textAlign: "center"
textAlign: "left",
marginLeft: 20
},
editImage: {
justifyContent: "center",
Expand Down
15 changes: 13 additions & 2 deletions src/Screens/PreviewImage/previewImg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from "react"

import { View, StyleSheet, Image, BackHandler } from "react-native"
import PreviewImageHeader from "~/Components/PreviewImage/previewImageHeader"

export default class PerfilSettings extends Component {
static navigationOptions = ({ navigation }) => {
Expand Down Expand Up @@ -36,17 +37,27 @@ export default class PerfilSettings extends Component {
} else {
image = <Image source={img} style={styles.img} resizeMode="contain" />
}
return <View style={styles.container}>{image}</View>
return (
<View style={styles.container}>
<PreviewImageHeader
navigation={navigation}
style={styles.previewImage}
/>
{image}
</View>
)
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "black",
alignItems: "center",
justifyContent: "center"
},
previewImage: {
flex: 1
},
img: {
flex: 1,
width: "100%"
Expand Down
10 changes: 8 additions & 2 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ const HomeStackNavigator = createStackNavigator(
}
},
PreviewImage: {
screen: PreviewImage
screen: PreviewImage,
navigationOptions: {
header: null
}
},

LanguagesScreen: {
Expand Down Expand Up @@ -148,7 +151,10 @@ const authStackNavigator = createStackNavigator(
}
},
PreviewImage: {
screen: PreviewImage
screen: PreviewImage,
navigationOptions: {
header: null
}
},
VerificationScreen: {
screen: Verification,
Expand Down