Skip to content

Commit 39aac22

Browse files
author
Kashish Grover
committed
add styles to productcard
1 parent 8219fd6 commit 39aac22

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

components/ProductCard.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ class ProductCard extends React.Component {
2424
resizeMode="contain"
2525
/>
2626
<View>
27-
<Text>
27+
<Text style={styles.title}>
2828
{product.title}
2929
</Text>
3030
{isProductAvailable
3131
? (
32-
<Text>
33-
{product.price}
32+
<Text style={styles.price}>
33+
{`₹ ${product.price}`}
3434
</Text>
3535
)
3636
: (
37-
<Text>
37+
<Text style={styles.soldOutText}>
3838
Sold Out
3939
</Text>
4040
)
@@ -60,4 +60,17 @@ const styles = StyleSheet.create({
6060
height: 120,
6161
width: 120,
6262
},
63+
title: {
64+
fontWeight: '500',
65+
fontSize: 18,
66+
},
67+
price: {
68+
paddingTop: 8,
69+
fontSize: 16,
70+
},
71+
soldOutText: {
72+
paddingTop: 8,
73+
color: '#fc6c85',
74+
fontWeight: '500',
75+
},
6376
});

0 commit comments

Comments
 (0)