11import React , { useEffect , useState } from 'react' ;
2- import { View } from 'react-native' ;
2+ import { SafeAreaView } from 'react-native' ;
33import Modal from 'react-native-modal' ;
44import PropTypes from 'prop-types' ;
55import { storeHelper } from './utils' ;
66import WebView from './WebView' ;
77import styles from './style' ;
8+ import { COLOR_WHITE } from './constants' ;
9+
810const propTypes = {
911 isModalVisible : PropTypes . bool . isRequired ,
1012 websiteToken : PropTypes . string . isRequired ,
@@ -25,7 +27,7 @@ const defaultProps = {
2527 cwCookie : '' ,
2628 user : { } ,
2729 locale : 'en' ,
28- customattributes : { } ,
30+ customAttributes : { } ,
2931} ;
3032
3133const ChatWootWidget = ( {
@@ -48,12 +50,15 @@ const ChatWootWidget = ({
4850
4951 return (
5052 < Modal
51- style = { styles . modal }
53+ backdropColor = { COLOR_WHITE }
5254 coverScreen
5355 isVisible = { isModalVisible }
56+ onBackButtonPress = { closeModal }
5457 onBackdropPress = { closeModal }
55- onBackButtonPress = { closeModal } >
56- < View style = { styles . mainView } >
58+ style = { styles . modal }
59+ >
60+ < SafeAreaView style = { styles . headerView } />
61+ < SafeAreaView style = { styles . mainView } >
5762 < WebView
5863 websiteToken = { websiteToken }
5964 cwCookie = { cwCookie }
@@ -63,7 +68,7 @@ const ChatWootWidget = ({
6368 customAttributes = { customAttributes }
6469 closeModal = { closeModal }
6570 />
66- </ View >
71+ </ SafeAreaView >
6772 </ Modal >
6873 ) ;
6974} ;
0 commit comments