-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventCarouselCardItem.js
42 lines (38 loc) · 1.35 KB
/
EventCarouselCardItem.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
import React from 'react'
import { View, Text, StyleSheet, Dimensions, Image } from "react-native"
import Colors from "../Themes/colors.js";
import Images from "../Themes/images.js";
import GlobalStyles from "../Themes/global-styles.js";
export const SLIDER_WIDTH = GlobalStyles.CONSTANTS.width - 2*GlobalStyles.CONSTANTS.padding;
export const ITEM_WIDTH = SLIDER_WIDTH * 0.7;
const CarouselCardItem = ({ item, index }) => {
return (
<View style={styles.eventsBodyWrapper} key={index}>
<Image
source={Images[item.img]}
style={styles.drink}
/>
<View style={styles.eventsBody}>
<Text style={GlobalStyles.smallHeading}>{item.title}</Text>
<Text style={GlobalStyles.smallText}>{item.body}</Text>
</View>
</View>
)
}
const styles = StyleSheet.create({
eventsBodyWrapper: {
padding: 13 * GlobalStyles.CONSTANTS.borderWidth,
flexDirection: "row",
justifyContent: "flex-start",
alignItems: "center",
paddingLeft: 0,
},
drink: {
resizeMode: "contain",
height: 50 * GlobalStyles.CONSTANTS.borderWidth,
width: 50 * GlobalStyles.CONSTANTS.borderWidth,
marginRight: 20 * GlobalStyles.CONSTANTS.borderWidth,
marginLeft: -30 * GlobalStyles.CONSTANTS.borderWidth,
}
})
export default CarouselCardItem;