diff --git a/src/components/Button.js b/src/components/Button.js
new file mode 100644
index 000000000..bd48aa794
--- /dev/null
+++ b/src/components/Button.js
@@ -0,0 +1,33 @@
+import PropTypes from 'prop-types';
+import React from 'react';
+import { StyleSheet } from 'react-native';
+import { Button as RNEButton } from 'react-native-elements';
+
+import { colors } from '../config';
+
+export const Button = ({ title, onPress }) => {
+ return (
+
+ );
+};
+
+const styles = StyleSheet.create({
+ titleStyle: {
+ color: colors.primary,
+ fontFamily: 'titillium-web-bold'
+ },
+ buttonStyle: {
+ borderColor: colors.primary
+ }
+});
+
+Button.propTypes = {
+ title: PropTypes.string.isRequired,
+ onPress: PropTypes.func.isRequired
+};
diff --git a/src/components/index.js b/src/components/index.js
index 5bac41e9d..4a1378363 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -1,3 +1,4 @@
+export * from './Button';
export * from './CardList';
export * from './DiagonalGradient';
export * from './HtmlView';
diff --git a/src/navigation/AppStackNavigator.js b/src/navigation/AppStackNavigator.js
index be21c7939..42afc2701 100644
--- a/src/navigation/AppStackNavigator.js
+++ b/src/navigation/AppStackNavigator.js
@@ -1,6 +1,6 @@
import { createStackNavigator } from 'react-navigation';
-import { DetailScreen, HomeScreen, HtmlScreen, IndexScreen } from '../screens';
+import { DetailScreen, HomeScreen, HtmlScreen, IndexScreen, WebScreen } from '../screens';
import { defaultStackNavigatorConfig } from './defaultStackNavigatorConfig';
import { texts } from '../config';
@@ -30,6 +30,12 @@ const AppStackNavigator = createStackNavigator(
navigationOptions: (props) => ({
title: props.navigation.getParam('title', '')
})
+ },
+ Web: {
+ screen: WebScreen,
+ navigationOptions: (props) => ({
+ title: props.navigation.getParam('title', '')
+ })
}
},
defaultStackNavigatorConfig('Home')
diff --git a/src/screens/HtmlScreen.js b/src/screens/HtmlScreen.js
index 57538b974..8c7667d4f 100644
--- a/src/screens/HtmlScreen.js
+++ b/src/screens/HtmlScreen.js
@@ -4,7 +4,7 @@ import { ActivityIndicator, ScrollView, StyleSheet, TouchableOpacity, View } fro
import { Query } from 'react-apollo';
import { colors, normalize } from '../config';
-import { HtmlView, Icon, Wrapper } from '../components';
+import { Button, HtmlView, Icon, Wrapper } from '../components';
import { trimNewLines } from '../helpers';
import { GET_PUBLIC_HTML_FILE } from '../queries';
import { arrowLeft } from '../icons';
@@ -25,6 +25,8 @@ export class HtmlScreen extends React.Component {
render() {
const { navigation } = this.props;
const queryVariables = navigation.getParam('queryVariables', '');
+ const title = navigation.getParam('title', '');
+ const webUrl = navigation.getParam('webUrl', '');
if (!queryVariables || !queryVariables.name) return null;
@@ -49,6 +51,20 @@ export class HtmlScreen extends React.Component {
+ {!!webUrl && (
+
);
diff --git a/src/screens/WebScreen.js b/src/screens/WebScreen.js
new file mode 100644
index 000000000..a11d7b688
--- /dev/null
+++ b/src/screens/WebScreen.js
@@ -0,0 +1,55 @@
+import PropTypes from 'prop-types';
+import React from 'react';
+import { ActivityIndicator, StyleSheet, TouchableOpacity, View, WebView } from 'react-native';
+
+import { colors, normalize } from '../config';
+import { Icon } from '../components';
+import { arrowLeft } from '../icons';
+
+export class WebScreen extends React.PureComponent {
+ static navigationOptions = ({ navigation }) => {
+ return {
+ headerLeft: (
+
+ navigation.goBack()}>
+
+
+
+ )
+ };
+ };
+
+ render() {
+ const { navigation } = this.props;
+ const webUrl = navigation.getParam('webUrl', '');
+
+ if (!webUrl) return null;
+
+ return (
+ (
+
+
+
+ )}
+ />
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ icon: {
+ paddingHorizontal: normalize(14)
+ },
+ loadingContainer: {
+ alignItems: 'center',
+ flex: 1,
+ justifyContent: 'center'
+ }
+});
+
+WebScreen.propTypes = {
+ navigation: PropTypes.object.isRequired
+};
diff --git a/src/screens/index.js b/src/screens/index.js
index 7c8400449..497c247f5 100644
--- a/src/screens/index.js
+++ b/src/screens/index.js
@@ -2,3 +2,4 @@ export * from './DetailScreen';
export * from './HomeScreen';
export * from './HtmlScreen';
export * from './IndexScreen';
+export * from './WebScreen';