/
DefaultSlide.js
41 lines (39 loc) · 1.07 KB
/
DefaultSlide.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
import React from 'react';
import { StyleSheet, Text, View, Image, Dimensions, Platform } from 'react-native';
export default class DefaultSlide extends React.PureComponent {
render() {
const { item, dimensions, bottomButton } = this.props;
const style = {
flex: 1,
backgroundColor: item.backgroundColor,
width: dimensions.width,
paddingBottom: bottomButton ? 132 : 64,
};
return (
<View style={[styles.mainContent, style]}>
<Text style={[styles.title, item.titleStyle]}>{item.title}</Text>
<Image source={item.image} style={item.imageStyle} />
<Text style={[styles.text, item.textStyle]}>{item.text}</Text>
</View>
);
}
}
const styles = StyleSheet.create({
mainContent: {
justifyContent: 'space-around',
alignItems: 'center',
},
text: {
color: 'rgba(255, 255, 255, .7)',
fontSize: 16,
textAlign: 'center',
fontWeight: '300',
paddingHorizontal: 16,
},
title: {
fontSize: 26,
color: 'rgba(255, 255, 255, .7)',
fontWeight: '300',
paddingHorizontal: 16,
},
});