This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
forked from coltonrusch/precursor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SamplePages.js
54 lines (45 loc) · 1.48 KB
/
SamplePages.js
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
import React from 'react';
import { View, Text, Button, TextInput, StyleSheet, ScrollView } from 'react-native';
import { StackActions, NavigationActions } from 'react-navigation';
import * as constants from "./CONSTANTS"
export default class SamplePages extends React.Component {
render() {
let words = this.props.navigation.getParam("words", []);
return (
<ScrollView style={styles.scrollView}>
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text style ={{marginBottom: 10, fontSize: 40}}>
PreCursor Sample Pages
</Text>
<Button
style = {styles.button}
title="Fruits"
color = {constants.mainButtonColor}
onPress={() => {
this.props.navigation.navigate("BrowserPage", {url: "https://en.wikipedia.org/wiki/Fruit", words: words})
}}
/>
<Button
style = {styles.button}
title="PMs of Canada"
color = {constants.mainButtonColor}
onPress={() => {
this.props.navigation.navigate("BrowserPage", {url: "https://en.wikipedia.org/wiki/List_of_prime_ministers_of_Canada", words: ["Justin"]})
}}
/>
</View>
</ScrollView>
);
}
}
const styles = StyleSheet.create({
scrollView: {
marginHorizontal: 10,
},
text: {
fontSize: 42,
},
button: {
marginBottom: 15
}
});