Skip to content

Commit 124a7bc

Browse files
author
Zack Story
committed
add map test case
1 parent 856bae2 commit 124a7bc

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*eslint-disable */
2+
import React, {View, Text, TouchableOpacity, MapView} from 'react-native';
3+
4+
const Drawer = require('react-native-drawer');
5+
6+
var SideDrawerContent = React.createClass({
7+
render() {
8+
return (
9+
<View
10+
style={{flex:1, flexDirection: 'column', justifyContent: 'center',alignItems: 'center', backgroundColor: '#EEE'}}>
11+
<Text>OrderList</Text>
12+
<Text>Notify</Text>
13+
</View>
14+
);
15+
}
16+
});
17+
18+
var Test = React.createClass({
19+
render () {
20+
return (
21+
<Drawer
22+
type="overlay"
23+
content={<SideDrawerContent />}
24+
captureGestures={true}
25+
openDrawerOffset={0.2}
26+
panOpenMask={20}
27+
negotiatePan={false}
28+
panCloseMask={0.2}
29+
closedDrawerOffset={-3}
30+
tweenHandler={(ratio) => ({ main: { opacity: (2 - ratio) / 2 } })}
31+
>
32+
<View style={{flex:1, flexDirection: 'column'}}>
33+
<MapView style={{flex:1}}/>
34+
<View style={{position: 'absolute', left: 0, top:0, bottom: 0, width: 20}} />
35+
<TouchableOpacity onPress={()=>console.log("button touched")} style={{height:30, backgroundColor:'#08c'}}>
36+
<Text>Button</Text>
37+
</TouchableOpacity>
38+
</View>
39+
</Drawer>
40+
)
41+
}
42+
});
43+
module.exports = Test;

0 commit comments

Comments
 (0)