Repository navigation
Expand file tree
/
Copy pathApp.Map.js
More file actions
43 lines (40 loc) · 1.45 KB
/
Copy pathApp.Map.js
File metadata and controls
43 lines (40 loc) · 1.45 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
/*eslint-disable */
import React, {View, Text, TouchableOpacity, MapView} from 'react-native';
const Drawer = require('react-native-drawer');
var SideDrawerContent = React.createClass({
render() {
return (
<View
style={{flex:1, flexDirection: 'column', justifyContent: 'center',alignItems: 'center', backgroundColor: '#EEE'}}>
<Text>OrderList</Text>
<Text>Notify</Text>
</View>
);
}
});
var Test = React.createClass({
render () {
return (
<Drawer
type="overlay"
content={<SideDrawerContent />}
captureGestures={true}
openDrawerOffset={0.2}
panOpenMask={20}
negotiatePan={false}
panCloseMask={0.2}
closedDrawerOffset={-3}
tweenHandler={(ratio) => ({ main: { opacity: (2 - ratio) / 2 } })}
>
<View style={{flex:1, flexDirection: 'column'}}>
<MapView style={{flex:1}}/>
<View style={{position: 'absolute', left: 0, top:0, bottom: 0, width: 20}} />
<TouchableOpacity onPress={()=>console.log("button touched")} style={{height:30, backgroundColor:'#08c'}}>
<Text>Button</Text>
</TouchableOpacity>
</View>
</Drawer>
)
}
});
module.exports = Test;