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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
import React, { Component } from 'react';
import {
StyleSheet,
View,
} from 'react-native';
import HTMLView from 'react-native-htmlview'
import ScrollableContainer from '../components/scrollableContainer'
import ClearText from '../components/text'
export default class Privacy extends Component {
constructor(props) {
super()
}
render() {
let body = this.props.content.body
return (
<ScrollableContainer heading='Privacy Policy'>
<View style={styles.body}>
<HTMLView value={body} stylesheet={htmlStyles} renderNode={renderNode} onLinkPress={this.props.onLinkPress} />
</View>
</ScrollableContainer>
)
}
}
function renderNode (node, index) {
if (node.name === 'hr') {
return ( <View key={index} style={styles.hr} /> )
}
// console.warn(node.name)
}
const styles = StyleSheet.create({
body: {
width: '90%',
maxWidth: '650px',
paddingBottom: 200,
},
hr: {
width: 50,
height: 2,
backgroundColor: '#fff',
marginBottom: 20,
},
})
const htmlStyles = StyleSheet.create({
p: {
color: 'white',
fontFamily: 'Futura-Medium',
textAlign: 'justify',
fontSize: 16,
lineHeight: 30,
margin: 0,
},
li: {
color: 'white',
fontFamily: 'Futura-Medium',
textAlign: 'justify',
fontSize: 16,
lineHeight: 30,
margin: 0,
},
b: {
fontFamily: 'Futura-MediumItalic',
color: 'white',
fontSize: 16,
lineHeight: 30,
},
i: {
fontFamily: 'Futura-MediumItalic',
color: 'white',
fontSize: 16,
lineHeight: 30,
},
a: {
color: 'white',
fontFamily: 'Futura-Medium',
textDecorationLine: 'underline',
fontSize: 16,
lineHeight: 30,
},
h1: {
color: 'white',
fontFamily: 'Futura-Medium',
fontSize: 24,
lineHeight: 40,
margin: 0,
},
h2: {
color: 'white',
fontFamily: 'Futura-Medium',
fontSize: 20,
lineHeight: 32,
margin: 0,
},
h3: {
color: 'white',
fontFamily: 'Futura-Medium',
fontSize: 16,
lineHeight: 30,
fontWeight: 'bold',
margin: 0,
},
})
|