|
5 | 5 | View, |
6 | 6 | Image, |
7 | 7 | TouchableOpacity, |
| 8 | + SafeAreaView, |
8 | 9 | } from 'react-native'; |
9 | 10 | import SideMenu from 'react-native-side-menu'; |
10 | 11 | import Menu from './Menu'; |
@@ -72,36 +73,38 @@ export default class Basic extends Component { |
72 | 73 | const menu = <Menu onItemSelected={this.onMenuItemSelected} />; |
73 | 74 |
|
74 | 75 | return ( |
75 | | - <SideMenu |
76 | | - menu={menu} |
77 | | - isOpen={this.state.isOpen} |
78 | | - onChange={isOpen => this.updateMenuState(isOpen)} |
79 | | - > |
80 | | - <View style={styles.container}> |
81 | | - <Text style={styles.welcome}> |
82 | | - Welcome to React Native! |
83 | | - </Text> |
84 | | - <Text style={styles.instructions}> |
85 | | - To get started, edit index.ios.js |
86 | | - </Text> |
87 | | - <Text style={styles.instructions}> |
88 | | - Press Cmd+R to reload,{'\n'} |
89 | | - Cmd+Control+Z for dev menu |
90 | | - </Text> |
91 | | - <Text style={styles.instructions}> |
92 | | - Current selected menu item is: {this.state.selectedItem} |
93 | | - </Text> |
94 | | - </View> |
95 | | - <TouchableOpacity |
96 | | - onPress={this.toggle} |
97 | | - style={styles.button} |
| 76 | + <SafeAreaView> |
| 77 | + <SideMenu |
| 78 | + menu={menu} |
| 79 | + isOpen={this.state.isOpen} |
| 80 | + onChange={isOpen => this.updateMenuState(isOpen)} |
98 | 81 | > |
99 | | - <Image |
100 | | - source={image} |
101 | | - style={{ width: 32, height: 32 }} |
102 | | - /> |
103 | | - </TouchableOpacity> |
104 | | - </SideMenu> |
| 82 | + <View style={styles.container}> |
| 83 | + <Text style={styles.welcome}> |
| 84 | + Welcome to React Native! |
| 85 | + </Text> |
| 86 | + <Text style={styles.instructions}> |
| 87 | + To get started, edit index.ios.js |
| 88 | + </Text> |
| 89 | + <Text style={styles.instructions}> |
| 90 | + Press Cmd+R to reload,{'\n'} |
| 91 | + Cmd+Control+Z for dev menu |
| 92 | + </Text> |
| 93 | + <Text style={styles.instructions}> |
| 94 | + Current selected menu item is: {this.state.selectedItem} |
| 95 | + </Text> |
| 96 | + </View> |
| 97 | + <TouchableOpacity |
| 98 | + onPress={this.toggle} |
| 99 | + style={styles.button} |
| 100 | + > |
| 101 | + <Image |
| 102 | + source={image} |
| 103 | + style={{ width: 32, height: 32 }} |
| 104 | + /> |
| 105 | + </TouchableOpacity> |
| 106 | + </SideMenu> |
| 107 | + </SafeAreaView> |
105 | 108 | ); |
106 | 109 | } |
107 | 110 | } |
0 commit comments