Skip to content

Commit 3ff889c

Browse files
committed
fix: modal example
1 parent 5833d57 commit 3ff889c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

example/components/ModalExample.tsx

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { memo, useState } from 'react'
2-
import { Button, Modal, View } from 'react-native'
2+
import { Button, Modal, SafeAreaView, View } from 'react-native'
33
import { AutocompleteDropdownContextProvider } from 'react-native-autocomplete-dropdown'
44
import { RemoteDataSetExample } from './RemoteDataSetExample'
55

@@ -9,12 +9,14 @@ export const ModalExample = memo(() => {
99
<>
1010
<Button onPress={() => setOpened(prev => !prev)} title="Open modal" />
1111
<Modal visible={opened}>
12-
<AutocompleteDropdownContextProvider>
13-
<View style={{ paddingHorizontal: 20, flex: 1, paddingTop: 40 }}>
14-
<RemoteDataSetExample />
15-
<Button onPress={() => setOpened(false)} title="Close modal" />
16-
</View>
17-
</AutocompleteDropdownContextProvider>
12+
<SafeAreaView style={{ flex: 1, backgroundColor: 'transparent' }}>
13+
<AutocompleteDropdownContextProvider>
14+
<View style={{ paddingHorizontal: 20, flex: 1, paddingTop: 20 }}>
15+
<RemoteDataSetExample />
16+
<Button onPress={() => setOpened(false)} title="Close modal" />
17+
</View>
18+
</AutocompleteDropdownContextProvider>
19+
</SafeAreaView>
1820
</Modal>
1921
</>
2022
)

0 commit comments

Comments
 (0)