File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { RemoteDataSetExample } from './components/RemoteDataSetExample'
19
19
import { RemoteDataSetExample2 } from './components/RemoteDataSetExample2'
20
20
import { CustomRightIconExample } from './components/CustomRightIconExample'
21
21
import { AutocompleteDropdownContextProvider } from 'react-native-autocomplete-dropdown'
22
+ import { ModalExample } from './components/ModalExample'
22
23
23
24
const App = ( ) => {
24
25
const isDarkMode = useColorScheme ( ) === 'dark'
@@ -68,6 +69,10 @@ const App = () => {
68
69
< Text style = { styles . sectionTitle } > Custom Right Icon Example</ Text >
69
70
< CustomRightIconExample />
70
71
</ View >
72
+ < View style = { styles . section } >
73
+ < Text style = { styles . sectionTitle } > Modal Example</ Text >
74
+ < ModalExample />
75
+ </ View >
71
76
</ View >
72
77
</ ScrollView >
73
78
</ KeyboardAvoidingView >
Original file line number Diff line number Diff line change
1
+ import React , { memo , useState } from 'react'
2
+ import { Button , Modal , View } from 'react-native'
3
+ import { RemoteDataSetExample } from './RemoteDataSetExample'
4
+ import { AutocompleteDropdownContextProvider } from '../../src'
5
+
6
+ export const ModalExample = memo ( ( ) => {
7
+ const [ opened , setOpened ] = useState ( false )
8
+ return (
9
+ < >
10
+ < Button onPress = { ( ) => setOpened ( prev => ! prev ) } title = "Open modal" />
11
+ < Modal visible = { opened } >
12
+ < AutocompleteDropdownContextProvider >
13
+ < View style = { { paddingHorizontal : 20 , flex : 1 } } >
14
+ < RemoteDataSetExample />
15
+ < Button onPress = { ( ) => setOpened ( false ) } title = "Close modal" />
16
+ </ View >
17
+ </ AutocompleteDropdownContextProvider >
18
+ </ Modal >
19
+ </ >
20
+ )
21
+ } )
Original file line number Diff line number Diff line change 35
35
"metro-react-native-babel-preset" : " 0.76.8" ,
36
36
"prettier" : " ^3.0.0" ,
37
37
"react-test-renderer" : " 18.2.0" ,
38
- "typescript" : " 4.8.4"
38
+ "typescript" : " 4.8.4" ,
39
+ "@react-native-community/cli-platform-android" : " *"
39
40
},
40
41
"engines" : {
41
42
"node" : " >=16"
You can’t perform that action at this time.
0 commit comments