Hangry/app/components/Public/signInUpHeader.js

65 lines
1.6 KiB
JavaScript
Executable File

import React, { Component } from "react";
import {
Platform,
StyleSheet,
View,
TouchableOpacity,
Image
} from "react-native";
import { scale, verticalScale, moderateScale } from "react-native-size-matters";
import Icon from "react-native-vector-icons/dist/MaterialCommunityIcons";
import Text from "react-native-text";
import { width, height } from "../../config/screen";
import Size from "../../config/size";
import theme from "../../config/colors";
const size = new Size();
export default class SignInUpHeader extends Component {
backAction() {
this.props.navigation.goBack();
}
render() {
return (
<View
style={{
...Platform.select({
ios: {
height: verticalScale(100)
},
android: {
height: verticalScale(130)
}
}),
alignItems: "center",
justifyContent: "center",
backgroundColor: theme.mainColor
}}
>
<Image
style={{
tintColor: "white",
height: verticalScale(70),
width: scale(70)
}}
source={require("../../images/appicon.png")}
resizeMode={"contain"}
/>
<View style={{ position: "absolute", left: 10 }}>
{this.props.back ? (
<Icon
name="chevron-left"
size={size.getSize(40)}
color={'white'}
style={{ marginLeft: 10 }}
onPress={() => this.backAction()}
/>
) : (
<View />
)}
</View>
</View>
);
}
}