forked from octopitus/rn-sliding-up-panel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScrollViewInsidePanel.js
62 lines (58 loc) · 1.97 KB
/
ScrollViewInsidePanel.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
52
53
54
55
56
57
58
59
60
61
62
import React from 'react'
import {View, TouchableOpacity, Text, ScrollView} from 'react-native'
import SlidingUpPanel from 'rn-sliding-up-panel'
const styles = {
container: {
flex: 1,
zIndex: 1,
backgroundColor: 'white',
alignItems: 'center',
justifyContent: 'center'
},
dragHandler: {
alignSelf: 'stretch',
height: 64,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#ccc'
}
}
class ScrollViewInsidePanel extends React.Component {
render() {
return (
<View style={styles.container}>
<TouchableOpacity onPress={() => this._panel.show()}>
<View>
<Text>Show</Text>
</View>
</TouchableOpacity>
<SlidingUpPanel ref={c => (this._panel = c)}>
{dragHandler => (
<View style={styles.container}>
<View style={styles.dragHandler} {...dragHandler}>
<Text>Drag handler</Text>
</View>
<ScrollView>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
<Text>Here is the content inside panel</Text>
</ScrollView>
</View>
)}
</SlidingUpPanel>
</View>
)
}
}
export default ScrollViewInsidePanel