@@ -9,13 +9,14 @@ import {
99 type TextInputSubmitEditingEventData ,
1010 type ViewProps ,
1111} from 'react-native' ;
12- import { SafeAreaProvider , SafeAreaView } from 'react-native-safe-area-context' ;
12+ import { SafeAreaProvider } from 'react-native-safe-area-context' ;
13+ import { MainContext } from '../../../contexts' ;
1314import refs , { DebuggerVisibility } from '../../../core/refs' ;
1415import colors from '../../../theme/colors' ;
15- import Touchable from '../common/Touchable' ;
16- import Icon from '../common/Icon' ;
1716import icons from '../../../theme/icons' ;
18- import { MainContext } from '../../../contexts' ;
17+ import Icon from '../common/Icon' ;
18+ import Touchable from '../common/Touchable' ;
19+ import SafeArea from '../common/SafeArea' ;
1920
2021interface SearchBarProps extends ViewProps { }
2122
@@ -48,7 +49,9 @@ const SearchBar = forwardRef<View, SearchBarProps>(({ style, ...props }, ref) =>
4849 return (
4950 < View ref = { ref } style = { [ styles . container , style ] } { ...props } >
5051 < SafeAreaProvider >
51- < SafeAreaView edges = { [ 'top' ] } style = { styles . safeArea } >
52+ < View style = { styles . barView } >
53+ < SafeArea inset = "top" />
54+
5255 < View style = { styles . inputWrapper } >
5356 < Icon source = { icons . search } size = { 18 } />
5457
@@ -68,11 +71,11 @@ const SearchBar = forwardRef<View, SearchBarProps>(({ style, ...props }, ref) =>
6871 onSubmitEditing = { onSubmitEditing }
6972 />
7073
71- < Touchable onPress = { onClear } style = { styles . closeButton } >
74+ < Touchable hitSlop = { 8 } onPress = { onClear } style = { styles . closeButton } >
7275 < Icon source = { icons . close } size = { 12 } color = { colors . black } />
7376 </ Touchable >
7477 </ View >
75- </ SafeAreaView >
78+ </ View >
7679
7780 < Touchable onPress = { onHideSearchInput } style = { styles . background } >
7881 < View />
@@ -88,7 +91,7 @@ const styles = StyleSheet.create({
8891 ...( Platform . OS === 'android' ? { zIndex : 9999 } : { } ) ,
8992 backgroundColor : colors . black + '80' , // 80 for 50% opacity
9093 } ,
91- safeArea : {
94+ barView : {
9295 backgroundColor : colors . lightGray ,
9396 padding : 8 ,
9497 } ,
0 commit comments