diff options
| author | jules <jules@carbonpictures.com> | 2017-06-02 15:42:34 +0000 |
|---|---|---|
| committer | jules <jules@carbonpictures.com> | 2017-06-02 15:42:34 +0000 |
| commit | 5f26431f03228a85273e7f7d51abd6098ea9f2a5 (patch) | |
| tree | 6a709972cbb0babd68aaa10fe277b2c843fd7451 /client/src/lib/views/privacy.js | |
| parent | 291fe3eedd9a460fc44d2ea3ea81c7d79f2dfbcf (diff) | |
| parent | dd70fa81a205304cb48bbc0494ad34c16d496ff2 (diff) | |
merge
Diffstat (limited to 'client/src/lib/views/privacy.js')
| -rw-r--r-- | client/src/lib/views/privacy.js | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/client/src/lib/views/privacy.js b/client/src/lib/views/privacy.js new file mode 100644 index 0000000..eb243a3 --- /dev/null +++ b/client/src/lib/views/privacy.js @@ -0,0 +1,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: 30, + 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, + }, +}) |
