Skip to content

Commit 8199ade

Browse files
authored
fix(RNPSW)-add-safearea-to-webview-modal (#223)
1 parent c41258d commit 8199ade

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

development/PaystackProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { createContext, useCallback, useMemo, useState } from 'react';
2-
import { Modal, View, ActivityIndicator, } from 'react-native';
2+
import { Modal, SafeAreaView, ActivityIndicator, } from 'react-native';
33
import { WebView, WebViewMessageEvent } from 'react-native-webview';
44
import {
55
PaystackParams,
@@ -89,7 +89,7 @@ export const PaystackProvider: React.FC<PaystackProviderProps> = ({
8989
<PaystackContext.Provider value={{ popup: { checkout, newTransaction } }}>
9090
{children}
9191
<Modal visible={visible} transparent animationType="slide">
92-
<View style={styles.container}>
92+
<SafeAreaView style={styles.container}>
9393
<WebView
9494
originWhitelist={["*"]}
9595
source={{ html: paystackHTML }}
@@ -101,7 +101,7 @@ export const PaystackProvider: React.FC<PaystackProviderProps> = ({
101101
onLoadEnd={() => debug && console.log('[Paystack] WebView Load End')}
102102
renderLoading={() => <ActivityIndicator size="large" />}
103103
/>
104-
</View>
104+
</SafeAreaView>
105105
</Modal>
106106
</PaystackContext.Provider>
107107
);

0 commit comments

Comments
 (0)