-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
51 lines (45 loc) · 1.11 KB
/
App.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
import React from 'react';
import { ScrollView } from 'react-native'
import { Appbar, Provider as PaperProvider } from 'react-native-paper'
import About from './src/components/About'
import Calc from './src/components/Calc'
import theme from './src/style/theme'
import styles from './src/style/styles'
export default class App extends React.Component {
constructor(props) {
super(props)
this.state = {
about: false
}
}
onCloseAbout = () => {
this.setState({
about: false
})
}
render() {
return (
<PaperProvider theme={theme}>
<Appbar.Header>
<Appbar.Content
title="EM Calc"
style={styles.appBarTitle}
/>
<Appbar.Action
icon="information"
onPress={() => this.setState({about: true})}
/>
</Appbar.Header>
<About
visible={this.state.about}
onCloseAbout={this.onCloseAbout}
/>
<ScrollView
style={{backgroundColor:theme.colors.surface}}
>
<Calc />
</ScrollView>
</PaperProvider>
)
}
}