@@ -10,88 +10,8 @@ import {
1010import { MagicScroll } from '../../../../src' ;
1111import { useSafeAreaInsets } from 'react-native-safe-area-context' ;
1212
13- const Form = ( ) => {
14- const insets = useSafeAreaInsets ( ) ;
15-
16- return (
17- < MagicScroll . ScrollView
18- scollViewProps = { {
19- contentContainerStyle : {
20- paddingHorizontal : 16 ,
21- paddingBottom : insets . bottom + 20 ,
22- paddingTop : 100 ,
23- } ,
24- } }
25- >
26- < MagicScroll . TextInput
27- name = "username"
28- textInputProps = { {
29- placeholder : 'Username' ,
30- style : {
31- height : 50 ,
32- backgroundColor : '#ddd' ,
33- borderRadius : 6 ,
34- paddingHorizontal : 16 ,
35- } ,
36- } }
37- />
38- < MagicScroll . TextInput
39- name = "first_name"
40- containerStyle = { { marginTop : 8 } }
41- textInputProps = { {
42- placeholder : 'First Name' ,
43- style : {
44- height : 50 ,
45- backgroundColor : '#ddd' ,
46- borderRadius : 6 ,
47- paddingHorizontal : 16 ,
48- } ,
49- } }
50- />
51- < MagicScroll . TextInput
52- name = "last_name"
53- containerStyle = { { marginTop : 8 } }
54- textInputProps = { {
55- placeholder : 'Last Name' ,
56- style : {
57- height : 50 ,
58- backgroundColor : '#ddd' ,
59- borderRadius : 6 ,
60- paddingHorizontal : 16 ,
61- } ,
62- } }
63- />
64- < MagicScroll . TextInput
65- name = "email"
66- containerStyle = { { marginTop : 8 } }
67- textInputProps = { {
68- placeholder : 'Email' ,
69- style : {
70- height : 50 ,
71- backgroundColor : '#ddd' ,
72- borderRadius : 6 ,
73- paddingHorizontal : 16 ,
74- } ,
75- } }
76- />
77- < MagicScroll . TextInput
78- name = "password"
79- containerStyle = { { marginTop : 8 } }
80- textInputProps = { {
81- placeholder : 'Password' ,
82- style : {
83- height : 50 ,
84- backgroundColor : '#ddd' ,
85- borderRadius : 6 ,
86- paddingHorizontal : 16 ,
87- } ,
88- } }
89- />
90- </ MagicScroll . ScrollView >
91- ) ;
92- } ;
93-
9413const Example = ( ) => {
14+ const insets = useSafeAreaInsets ( ) ;
9515 const bottomSheetModalRef = useRef < BottomSheetModal > ( null ) ;
9616
9717 const snapPoints = useMemo ( ( ) => [ '25%' , '80%' ] , [ ] ) ;
@@ -127,9 +47,80 @@ const Example = () => {
12747 enablePanDownToClose
12848 >
12949 < BottomSheetView style = { [ styles . contentContainer ] } >
130- < MagicScroll . SmartScrollView >
131- < Form />
132- </ MagicScroll . SmartScrollView >
50+ < MagicScroll . ScrollView
51+ scollViewProps = { {
52+ contentContainerStyle : {
53+ paddingHorizontal : 16 ,
54+ paddingBottom : insets . bottom + 20 ,
55+ paddingTop : 100 ,
56+ } ,
57+ } }
58+ >
59+ < MagicScroll . TextInput
60+ name = "username"
61+ textInputProps = { {
62+ placeholder : 'Username' ,
63+ style : {
64+ height : 50 ,
65+ backgroundColor : '#ddd' ,
66+ borderRadius : 6 ,
67+ paddingHorizontal : 16 ,
68+ } ,
69+ } }
70+ />
71+ < MagicScroll . TextInput
72+ name = "first_name"
73+ containerStyle = { { marginTop : 8 } }
74+ textInputProps = { {
75+ placeholder : 'First Name' ,
76+ style : {
77+ height : 50 ,
78+ backgroundColor : '#ddd' ,
79+ borderRadius : 6 ,
80+ paddingHorizontal : 16 ,
81+ } ,
82+ } }
83+ />
84+ < MagicScroll . TextInput
85+ name = "last_name"
86+ containerStyle = { { marginTop : 8 } }
87+ textInputProps = { {
88+ placeholder : 'Last Name' ,
89+ style : {
90+ height : 50 ,
91+ backgroundColor : '#ddd' ,
92+ borderRadius : 6 ,
93+ paddingHorizontal : 16 ,
94+ } ,
95+ } }
96+ />
97+ < MagicScroll . TextInput
98+ name = "email"
99+ containerStyle = { { marginTop : 8 } }
100+ textInputProps = { {
101+ placeholder : 'Email' ,
102+ style : {
103+ height : 50 ,
104+ backgroundColor : '#ddd' ,
105+ borderRadius : 6 ,
106+ paddingHorizontal : 16 ,
107+ } ,
108+ } }
109+ />
110+ < MagicScroll . TextInput
111+ name = "password"
112+ containerStyle = { { marginTop : 8 } }
113+ textInputProps = { {
114+ placeholder : 'Password' ,
115+ style : {
116+ height : 50 ,
117+ backgroundColor : '#ddd' ,
118+ borderRadius : 6 ,
119+ paddingHorizontal : 16 ,
120+ } ,
121+ } }
122+ />
123+ </ MagicScroll . ScrollView >
133124 </ BottomSheetView >
134125 </ BottomSheetModal >
135126 </ View >
0 commit comments