File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change
1
+ import { Platform } from "react-native" ;
1
2
import {
2
- hasNotch ,
3
3
getStatusBarHeight ,
4
+ isIPhoneXFamily ,
4
5
isAndroid
5
6
} from "@freakycoder/react-native-helpers" ;
6
7
@@ -22,19 +23,22 @@ export const container = (backgroundColor, insets) => {
22
23
backgroundColor,
23
24
borderBottomEndRadius : 24 ,
24
25
borderBottomStartRadius : 24 ,
25
- height : isAndroid ? insets . top + 70 : 115
26
+ height : isAndroid ? insets . top + 70 : isIPhoneXFamily ( ) ? 115 : 80
26
27
} ;
27
28
} ;
28
29
29
30
export const searchboxContainer = insets => ( {
30
31
flexDirection : "row" ,
31
32
alignItems : "center" ,
32
33
justifyContent : "space-around" ,
33
- marginTop : hasNotch ( )
34
- ? getStatusBarHeight ( ) + 16
35
- : isAndroid
36
- ? insets . top + 16
37
- : 0
34
+ ...Platform . select ( {
35
+ ios : {
36
+ marginTop : isIPhoneXFamily ( ) ? getStatusBarHeight ( ) + 16 : 30
37
+ } ,
38
+ android : {
39
+ marginTop : insets . top + 16
40
+ }
41
+ } )
38
42
} ) ;
39
43
40
44
export default {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-native-header-search-bar" ,
3
- "version" : " 0.1.4 " ,
3
+ "version" : " 0.1.5 " ,
4
4
"description" : " Fully customizable header search bar for React Native" ,
5
5
"keywords" : [
6
6
" header" ,
You can’t perform that action at this time.
0 commit comments