-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.tsx
61 lines (58 loc) · 1.28 KB
/
index.tsx
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
import Face from "./Face"
import FlipCard from "../DetailsScreen/Cards/FlipCard"
import React from "react"
import RootStore from "../RootStore"
import context from "../context"
import { View } from "react-native"
import { observer } from "mobx-react"
@observer
export default class StudyScreen extends React.Component {
static contextType = context
context: RootStore = null
render(): JSX.Element {
return (
<View style={{ flex: 1 }}>
<View
style={{
alignItems: "center",
aspectRatio: 1,
justifyContent: "center",
width: "100%",
}}
>
<FlipCard front={this.context.selectedSet.studyCards[0].front} back={this.context.selectedSet.studyCards[0].back} />
</View>
<View
style={{
alignItems: "center",
flex: 1,
}}
>
<View
style={{
flexDirection: "row",
justifyContent: "space-evenly",
width: "100%",
}}
>
<Face
icon="frown"
color="#f44336"
onPress={(): void => console.log(":(")}
/>
<Face
icon="meh"
color="#ffc107"
onPress={(): void => console.log(":|")}
/>
<Face
icon="smile"
color="#4caf50"
onPress={(): void => console.log(":)")}
/>
</View>
</View>
</View>
)
}
}