File tree Expand file tree Collapse file tree 6 files changed +34
-15
lines changed Expand file tree Collapse file tree 6 files changed +34
-15
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog of ` @reason-react-native/safe-area-context `
2
2
3
+ ## 0.7.0 - 2020-02-29
4
+
5
+
6
+ - Add ` initialSafeAreaInsets ` for SafeAreaProvider
7
+ - Add ` initialWindowSafeAreaInsets `
8
+
3
9
## 0.6.0 - 2019-12-19
4
10
5
11
Initial release
Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ type insets = {
58
58
};
59
59
```
60
60
61
+ ### Constants
62
+
63
+ #### ` initialWindowSafeAreaInsets `
64
+
65
+ See < https://github.com/th3rdwave/react-native-safe-area-context#optimization >
66
+
61
67
### Methods
62
68
63
69
#### ` <ReactNativeSafeAreaContext.SafeAreaProvider> `
@@ -68,13 +74,16 @@ open ReactNativeSafeAreaContext;
68
74
69
75
[@react.component]
70
76
let make = () => {
71
- <SafeAreaProvider>
77
+ <SafeAreaProvider /*initialSafeAreaInsets={...}*/ >
72
78
// your app...
73
79
<View />
74
80
<SafeAreaProvider>;
75
81
}
76
82
```
77
83
84
+ See < https://github.com/th3rdwave/react-native-safe-area-context#web-ssr > for
85
+ ` initialSafeAreaInsets ` .
86
+
78
87
#### ` ReactNativeSafeAreaContext.useSafeArea(): insets `
79
88
80
89
``` reason
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @reason-react-native/safe-area-context" ,
3
- "version" : " 0.6 .0" ,
3
+ "version" : " 0.7 .0" ,
4
4
"publishConfig" : {
5
5
"access" : " public"
6
6
},
7
7
"peerDependencies" : {
8
8
"reason-react" : " ^0.7.0" ,
9
9
"reason-react-native" : " ^0.61.0" ,
10
- "react-native-safe-area-context" : " ^0.6 .0"
10
+ "react-native-safe-area-context" : " ^0.7 .0"
11
11
},
12
12
"repository" : " https://github.com/reason-react-native/safe-area-context.git" ,
13
13
"license" : " MIT" ,
38
38
"release" : " npmpub"
39
39
},
40
40
"devDependencies" : {
41
- "bs-platform" : " ^5 .2.0" ,
41
+ "bs-platform" : " ^7 .2.0" ,
42
42
"husky" : " ^1.3.0" ,
43
43
"lint-staged" : " ^8.1.0" ,
44
44
"npmpub" : " ^5.0.0" ,
Original file line number Diff line number Diff line change 1
- module SafeAreaProvider = {
2
- [@ react . component ] [@ bs . module "react-native-safe-area-context" ]
3
- external make : (~children : React . element =?) => React . element =
4
- "SafeAreaProvider" ;
5
- };
6
-
7
1
type insets = {
8
2
.
9
3
"top": float ,
@@ -12,6 +6,17 @@ type insets = {
12
6
"right": float ,
13
7
};
14
8
9
+ [@ bs . module "react-native-safe-area-context" ]
10
+ external initialWindowSafeAreaInsets : insets = "initialWindowSafeAreaInsets" ;
11
+
12
+ module SafeAreaProvider = {
13
+ [@ react . component ] [@ bs . module "react-native-safe-area-context" ]
14
+ external make :
15
+ (~initialSafeAreaInsets : insets , ~children : React . element =?) =>
16
+ React . element =
17
+ "SafeAreaProvider" ;
18
+ };
19
+
15
20
[@ bs . module "react-native-safe-area-context" ]
16
21
external useSafeArea : unit => insets = "useSafeArea" ;
17
22
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -173,10 +173,10 @@ braces@^2.3.1:
173
173
split-string "^3.0.2"
174
174
to-regex "^3.0.1"
175
175
176
- bs-platform@^5 .2.0 :
177
- version "5 .2.0"
178
- resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-5 .2.0.tgz#0ec317273daed573491c105f68ea48826a285b7a "
179
- integrity sha512-miyePsOF9VbuhT5QD5E/hb+l454Fo4MAcg5xV1GJhbWxmejuF/X7mCYUsNrK1UUAaYt8hnoyFdeLG22sxVta9A ==
176
+ bs-platform@^7 .2.0 :
177
+ version "7 .2.0"
178
+ resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7 .2.0.tgz#9b22a429313574de99e5a48e88224ae84ed64ee8 "
179
+ integrity sha512-mgwsJ3C1nthhasoR1L3H/7+v7zuCybxI8rTrxl4aOJZfrEZSU2a3E7QTEFfB4gHpOJUvmC1/LkwQNlTTrHautg ==
180
180
181
181
cache-base@^1.0.1 :
182
182
version "1.0.1"
You can’t perform that action at this time.
0 commit comments