-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.js
40 lines (31 loc) · 857 Bytes
/
main.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
import React, { AppRegistry, StatusBarIOS, Text } from 'react-native';
import ExScreen from './ExScreen';
import Connect4 from './components/connect4/connect4';
import styles, { colors } from './components/connect4/styles/stylesheet';
class App extends React.Component {
constructor() {
super();
this.state = {
headerColor: colors.cyan,
isBoxPressed: false,
};
}
render() {
return (
<ExScreen
title="Play Connect4"
headerColor={this.state.headerColor}
scrollEnabled={!this.state.isBoxPressed}
style={styles.container}>
<Connect4 />
</ExScreen>
);
}
componentDidMount() {
if (StatusBarIOS) {
StatusBarIOS.setStyle('light-content', true);
StatusBarIOS.setHidden(false, 'fade');
}
}
}
AppRegistry.registerComponent('main', () => App);