2022-08-26 16:19:39 +05:00
|
|
|
import { Text, View } from "react-native";
|
|
|
|
|
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
|
|
|
|
import { useThemeStore } from "../../stores/use-theme-store";
|
|
|
|
|
import { SIZE } from "../../utils/size";
|
|
|
|
|
import Paragraph from "../ui/typography/paragraph";
|
|
|
|
|
import { ProTag } from "./pro-tag";
|
2021-11-11 13:08:28 +05:00
|
|
|
|
2022-08-26 16:19:39 +05:00
|
|
|
export const FeatureBlock = ({
|
|
|
|
|
vertical,
|
|
|
|
|
highlight,
|
|
|
|
|
content,
|
|
|
|
|
icon,
|
|
|
|
|
pro,
|
|
|
|
|
proTagBg
|
|
|
|
|
}) => {
|
|
|
|
|
const colors = useThemeStore((state) => state.colors);
|
2021-11-11 13:08:28 +05:00
|
|
|
|
2021-11-15 15:24:37 +05:00
|
|
|
return vertical ? (
|
|
|
|
|
<View
|
|
|
|
|
style={{
|
2022-08-26 16:19:39 +05:00
|
|
|
flexDirection: "row",
|
|
|
|
|
alignItems: "center",
|
2021-11-15 15:24:37 +05:00
|
|
|
paddingHorizontal: 12,
|
2022-01-22 12:57:05 +05:00
|
|
|
marginBottom: 10
|
|
|
|
|
}}
|
|
|
|
|
>
|
2021-11-15 15:24:37 +05:00
|
|
|
<Icon color={colors.accent} name="check" size={SIZE.lg} />
|
|
|
|
|
|
|
|
|
|
<Paragraph
|
|
|
|
|
style={{
|
2022-08-26 16:19:39 +05:00
|
|
|
flexWrap: "wrap",
|
2021-11-15 15:24:37 +05:00
|
|
|
marginLeft: 5,
|
|
|
|
|
flexShrink: 1
|
|
|
|
|
}}
|
2022-01-22 12:57:05 +05:00
|
|
|
size={SIZE.md}
|
|
|
|
|
>
|
2021-11-15 15:24:37 +05:00
|
|
|
{content}
|
|
|
|
|
</Paragraph>
|
|
|
|
|
</View>
|
|
|
|
|
) : (
|
2021-11-11 13:08:28 +05:00
|
|
|
<View
|
|
|
|
|
style={{
|
|
|
|
|
height: 100,
|
2022-08-26 16:19:39 +05:00
|
|
|
justifyContent: "center",
|
2021-11-11 13:08:28 +05:00
|
|
|
padding: 10,
|
|
|
|
|
marginRight: 10,
|
|
|
|
|
borderRadius: 5,
|
|
|
|
|
minWidth: 100
|
2022-01-22 12:57:05 +05:00
|
|
|
}}
|
|
|
|
|
>
|
2021-11-11 13:08:28 +05:00
|
|
|
<Icon color={colors.icon} name={icon} size={SIZE.xl} />
|
|
|
|
|
<Paragraph size={SIZE.md}>
|
2022-01-22 12:57:05 +05:00
|
|
|
<Text style={{ color: colors.accent }}>{highlight}</Text>
|
2022-08-26 16:19:39 +05:00
|
|
|
{"\n"}
|
2021-11-11 13:08:28 +05:00
|
|
|
{content}
|
|
|
|
|
</Paragraph>
|
|
|
|
|
|
|
|
|
|
{pro ? (
|
|
|
|
|
<>
|
2022-01-22 12:57:05 +05:00
|
|
|
<View style={{ height: 5 }} />
|
2021-11-11 13:08:28 +05:00
|
|
|
<ProTag width={50} size={SIZE.xs} background={proTagBg} />
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<View
|
|
|
|
|
style={{
|
|
|
|
|
width: 30,
|
|
|
|
|
height: 3,
|
|
|
|
|
marginTop: 10,
|
|
|
|
|
borderRadius: 100,
|
|
|
|
|
backgroundColor: colors.accent
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
};
|