-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeelingsPage.js
More file actions
112 lines (106 loc) · 3.11 KB
/
FeelingsPage.js
File metadata and controls
112 lines (106 loc) · 3.11 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
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
107
108
109
110
111
112
import React, { Component } from 'react';
import {Constants} from 'expo'
import {
Container,
Content,
Toast,
Header,
Button,
Text,
Thumbnail,
ListItem,
Body,
Form,
Item as FormItem,
Input,
Label,
Title,
} from 'native-base';
import { Left, Right, Icon,} from 'native-base';
import { Actions } from 'react-native-router-flux';
import firebase from 'firebase';
export default class HeaderIconExample extends Component {
constructor(props) {
super(props);
this.clickEmo1 = this.clickEmo1.bind(this);
this.clickEmo2 = this.clickEmo2.bind(this);
this.clickEmo3 = this.clickEmo3.bind(this);
this.clickEmo4 = this.clickEmo4.bind(this);
}
clickEmo1() {
console.log('Click happened');
firebase.database().ref('data').update(
{
feelings: 'Happy'
}
)
}
clickEmo2() {
console.log('Click happened');
firebase.database().ref('data').update(
{
feelings: 'Anxious'
}
)
}
clickEmo3() {
console.log('Click happened');
firebase.database().ref('data').update(
{
feelings: 'Sad'
}
)
}
clickEmo4() {
console.log('Click happened');
firebase.database().ref('data').update(
{
feelings: 'Okay'
}
)
}
render() {
return (
<Container>
<Content padder>
<Button large block transparent dark>
<Text large> How are you feeling today? </Text>
</Button>
<Button > </Button>
<Button large block success onPress={this.clickEmo1}>
<Text>Happy</Text>
<ListItem avatar>
<Thumbnail source={{ uri: 'https://icon-icons.com/icons2/510/PNG/512/happy_icon-icons.com_50377.png' }} />
</ListItem>
</Button>
<Button large>
</Button>
<Button large block info onPress={this.clickEmo2}>
<Text>Anxious</Text>
<ListItem avatar>
<Thumbnail source={{ uri: 'https://static.thenounproject.com/png/116790-200.png' }} />
</ListItem>
</Button>
<Button large>
</Button>
<Button large block danger onPress={this.clickEmo3}>
<Text>Sad</Text>
<ListItem avatar>
<Thumbnail source={{ uri: 'https://cdn2.iconfinder.com/data/icons/picons-essentials/71/smiley_sad-512.png' }} />
</ListItem>
</Button>
<Button large> </Button>
<Button large block warning onPress={this.clickEmo4}>
<Text>So So</Text>
<ListItem avatar>
<Thumbnail source={{ uri:'https://cdn2.iconfinder.com/data/icons/rounded-white-emoticon/139/Meh-RoundedWhite_emoticon-512.png' }} />
</ListItem>
</Button>
<Button large block transparent style={{bottom:8}}>
<Text large onPress={Actions.checklist}> Next </Text>
</Button>
</Content>
</Container>
);
}
}