-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNFTCard.js
72 lines (64 loc) · 1.72 KB
/
NFTCard.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import React from "react";
import { useNavigation } from "@react-navigation/native";
import { View, Image } from "react-native";
import { COLORS, SIZES, SHADOWS, assets } from "../constants";
import { SubInfo, EthPrice, NFTTitle } from "./SubInfo";
import { RectButton, CircleButton } from "./Button";
const NFTCard = ({ data }) => {
const navigation = useNavigation();
return (
<View
style={{
backgroundColor: COLORS.white,
borderRadius: SIZES.font,
marginBottom: SIZES.extraLarge,
margin: SIZES.base,
...SHADOWS.dark,
}}
>
<View
style={{
width: "100%",
height: 250,
}}
>
<Image
source={data.image}
resizeMode="cover"
style={{
width: "100%",
height: "100%",
borderTopLeftRadius: SIZES.font,
borderTopRightRadius: SIZES.font,
}}
/>
<CircleButton imgUrl={assets.heart} right={10} top={10} />
</View>
<SubInfo />
<View style={{ width: "100%", padding: SIZES.font }}>
<NFTTitle
title={data.name}
subTitle={data.creator}
titleSize={SIZES.large}
subTitleSize={SIZES.small}
/>
<View
style={{
marginTop: SIZES.font,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
}}
>
<EthPrice price={data.price} />
<RectButton
minWidth={120}
fontSize={SIZES.font}
handlePress={() => navigation.navigate("Details", { data })}
/>
</View>
</View>
</View>
);
};
export default NFTCard;