After Width: | Height: | Size: 728 B |
After Width: | Height: | Size: 794 B |
After Width: | Height: | Size: 664 B |
After Width: | Height: | Size: 806 B |
@ -1,33 +1,44 @@ |
||||
import React from 'react'; |
||||
import {View, Text, Dimensions, Image} from 'react-native'; |
||||
import tw from 'tailwind-react-native-classnames'; |
||||
import React, { useState, useEffect } from "react"; |
||||
import { View, Text, Dimensions, Image, ImageBackground } from "react-native"; |
||||
import tw from "tailwind-rn"; |
||||
|
||||
const width = Dimensions.get('window').width; |
||||
const height = Dimensions.get('window').height; |
||||
const width = Dimensions.get("window").width; |
||||
const height = Dimensions.get("window").height; |
||||
|
||||
export default function Header({icon, title, description, background}) { |
||||
export default function Header({ title, description, background }) { |
||||
return ( |
||||
<View |
||||
style={[ |
||||
tw.style('w-full flex flex-col items-center justify-end pb-3 relative mb-0'), |
||||
{height: height / 4.5, backgroundColor: '#E9F0F7'}, |
||||
]}> |
||||
<Image source={background} style={[tw.style('absolute left-0 top-0'), {}]} /> |
||||
<Image source={icon} style={[{width : width / 5, height : height / 10, marginBottom : 10}]} /> |
||||
<Text |
||||
tw("w-full flex flex-col items-center pb-7"), |
||||
{ height: height / 4.5, backgroundColor: "#E9F0F7" }, |
||||
]} |
||||
> |
||||
<ImageBackground |
||||
source={background} |
||||
resizeMode="contain" |
||||
style={[ |
||||
{fontSize: width / 25, color: '#196EC0', fontFamily: 'bold'}, |
||||
tw.style(' mb-1'), |
||||
]}> |
||||
{title} |
||||
</Text> |
||||
tw( |
||||
"w-full" |
||||
), |
||||
{ height: "80%" }, |
||||
]} |
||||
> |
||||
</ImageBackground> |
||||
<Text |
||||
style={[ |
||||
{color: '#86A0B9', fontSize: width / 36, fontFamily: 'light'}, |
||||
tw.style(' mb-2'), |
||||
]}> |
||||
{description} |
||||
</Text> |
||||
style={[ |
||||
{ fontSize: width / 25, color: "#196EC0", fontFamily: "bold" }, |
||||
tw(" mb-1"), |
||||
]} |
||||
> |
||||
{title} |
||||
</Text> |
||||
<Text |
||||
style={[ |
||||
{ color: "#86A0B9", fontSize: width / 36, fontFamily: "light" }, |
||||
]} |
||||
> |
||||
{description} |
||||
</Text> |
||||
</View> |
||||
); |
||||
} |
||||
|
@ -0,0 +1,58 @@ |
||||
import { View, Text, Image, TouchableOpacity } from "react-native"; |
||||
import React from "react"; |
||||
import tw from "tailwind-rn"; |
||||
import fontSize from "../../constants/fontSize"; |
||||
|
||||
const Box = ({ info }) => { |
||||
return ( |
||||
<TouchableOpacity |
||||
style={[ |
||||
tw("flex flex-row-reverse py-4 px-3 rounded-md mt-4"), |
||||
{ |
||||
backgroundColor: info.bg, |
||||
borderColor: info.borderColor, |
||||
borderWidth: 1, |
||||
}, |
||||
]} |
||||
> |
||||
<Image source={info.icon} style={{ width: 40, height: 40 }} /> |
||||
<View style={tw("flex flex-col flex-1 mr-3")}> |
||||
<Text |
||||
style={{ |
||||
fontFamily: "regular", |
||||
fontSize: fontSize.sm, |
||||
color: info.title.color, |
||||
}} |
||||
> |
||||
{info.title.text} |
||||
</Text> |
||||
<Text |
||||
style={[ |
||||
tw("mt-1"), |
||||
{ |
||||
fontFamily: "light", |
||||
fontSize: fontSize.xs, |
||||
color: info.description.color, |
||||
}, |
||||
]} |
||||
> |
||||
{info.description.text} |
||||
</Text> |
||||
<Text |
||||
style={[ |
||||
tw("self-start mt-2"), |
||||
{ |
||||
fontFamily: "light", |
||||
fontSize: fontSize.xs, |
||||
color: info?.link?.color, |
||||
}, |
||||
]} |
||||
> |
||||
{info?.link?.title} |
||||
</Text> |
||||
</View> |
||||
</TouchableOpacity> |
||||
); |
||||
}; |
||||
|
||||
export default Box; |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 1.2 KiB |