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
|
import React from 'react';
import {
View,
Image,
Dimensions,
} from 'react-native';
import {
RkText,
RkStyleSheet,
RkTheme,
} from 'react-native-ui-kitten';
export class Walkthrough2 extends React.Component {
getThemeImageSource = (theme) => (
theme.name === 'light' ?
require('../../assets/images/screensImage.png') : require('../../assets/images/screensImageDark.png')
);
renderImage = () => (
<Image
style={{ width: Dimensions.get('window').width }}
source={this.getThemeImageSource(RkTheme.current)}
/>
);
render = () => (
<View style={styles.screen}>
{this.renderImage()}
<RkText rkType='header2' style={styles.text}>Share info about ecological problems around!</RkText>
</View>
)
}
const styles = RkStyleSheet.create(theme => ({
screen: {
backgroundColor: theme.colors.screen.base,
alignItems: 'center',
justifyContent: 'center',
flex: 1,
},
text: {
textAlign: 'center',
marginTop: 20,
marginHorizontal: 30,
},
}));
|