You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

58 lines
1.3 KiB

import { View, Text, Dimensions, ImageBackground } from "react-native";
import { connect } from "react-redux";
//style
import tw from "tailwind-rn";
import fontSize from "../constants/fontSize";
import Colors from "../constants/Colors";
const height = Dimensions.get("window").height;
function Header({ title, description, background }) {
return (
<View
style={[
tw(`w-full flex items-center pb-7`),
{
height: height / 4.5,
backgroundColor: Colors.theme1.greenCF + "0F",
},
]}
>
<ImageBackground
source={background}
resizeMode="contain"
style={[tw("w-full"), { height: "80%" }]}
></ImageBackground>
<Text
style={[
{
fontSize: fontSize.xl,
color: Colors.theme1.greenCF,
fontFamily: "bold",
},
]}
>
{title}
</Text>
<Text
style={[
{
color: Colors.theme1.greenCF,
fontSize: fontSize.sm,
fontFamily: "regular",
marginTop: 5
},
]}
>
{description}
</Text>
</View>
);
}
const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile,
});
export default connect(mapStateToProps)(Header);