PlainText.js
1.22 KB
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
'use strict';
import React from 'react';
import ReactNative from 'react-native';
const {
Component,
} = React;
const {
View,
Text,
Platform,
StyleSheet,
} = ReactNative;
export default class PlainText extends Component {
static propTypes = {
topText: React.PropTypes.string,
bottomText: React.PropTypes.string,
containerStyle: View.propTypes.style,
topTextStyle: View.propTypes.style,
bottomTextStyle: View.propTypes.style,
};
render() {
return (
<View style={[styles.container, this.props.containerStyle]}>
<Text style={[styles.topText, this.props.topTextStyle]}>{this.props.topText}</Text>
<Text style={[styles.bottomText, this.props.bottomTextStyle]}>{this.props.bottomText}</Text>
</View>
);
}
}
let styles = StyleSheet.create({
container: {
},
topText: {
fontSize: 14,
color: '#444444',
textAlign: 'center',
lineHeight: 20,
marginTop: 15,
marginBottom: 10,
},
bottomText: {
fontSize: 17,
color: '#D0021B',
fontWeight: 'bold',
textAlign: 'center',
marginBottom: 15,
},
});