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.
43 lines
1.0 KiB
43 lines
1.0 KiB
import { View, Text, Dimensions, ImageBackground } from "react-native"; |
|
import { connect } from "react-redux"; |
|
import tw from "tailwind-rn"; |
|
import fontSize from "../constants/fontSize"; |
|
|
|
const height = Dimensions.get("window").height; |
|
|
|
function Header({ title, description, background }) { |
|
return ( |
|
<View |
|
style={[ |
|
tw(`w-full flex flex-col items-center pb-7`), |
|
{ height: height / 4.5, backgroundColor: "#E9F0F7" }, |
|
]} |
|
> |
|
<ImageBackground |
|
source={background} |
|
resizeMode="contain" |
|
style={[tw("w-full"), { height: "80%" }]} |
|
></ImageBackground> |
|
<Text |
|
style={[ |
|
{ fontSize: fontSize.xl, color: "#196EC0", fontFamily: "bold" }, |
|
]} |
|
> |
|
{title} |
|
</Text> |
|
<Text |
|
style={[ |
|
{ color: "#86A0B9", fontSize: fontSize.tiny, fontFamily: "regular" }, |
|
]} |
|
> |
|
{description} |
|
</Text> |
|
</View> |
|
); |
|
} |
|
|
|
const mapStateToProps = (state) => ({ |
|
mobile: state.publicApi.mobile |
|
}) |
|
|
|
export default connect(mapStateToProps)(Header);
|
|
|