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 11# Changelog of ` @reason-react-native/safe-area-context `
22
3+ ## 0.7.0 - 2020-02-29
4+
5+ - Use ` bs-platform@7.2.0 `
6+ - Add ` initialSafeAreaInsets ` for SafeAreaProvider
7+ - Add ` initialWindowSafeAreaInsets `
8+
39## 0.6.0 - 2019-12-19
410
511Initial release
Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ type insets = {
5858};
5959```
6060
61+ ### Constants
62+
63+ #### ` initialWindowSafeAreaInsets `
64+
65+ See < https://github.com/th3rdwave/react-native-safe-area-context#optimization >
66+
6167### Methods
6268
6369#### ` <ReactNativeSafeAreaContext.SafeAreaProvider> `
@@ -68,13 +74,16 @@ open ReactNativeSafeAreaContext;
6874
6975[@react.component]
7076let make = () => {
71- <SafeAreaProvider>
77+ <SafeAreaProvider /*initialSafeAreaInsets={...}*/ >
7278 // your app...
7379 <View />
7480 <SafeAreaProvider>;
7581}
7682```
7783
84+ See < https://github.com/th3rdwave/react-native-safe-area-context#web-ssr > for
85+ ` initialSafeAreaInsets ` .
86+
7887#### ` ReactNativeSafeAreaContext.useSafeArea(): insets `
7988
8089``` reason
Original file line number Diff line number Diff line change 11{
22 "name" : " @reason-react-native/safe-area-context" ,
3- "version" : " 0.6 .0" ,
3+ "version" : " 0.7 .0" ,
44 "publishConfig" : {
55 "access" : " public"
66 },
77 "peerDependencies" : {
88 "reason-react" : " ^0.7.0" ,
99 "reason-react-native" : " ^0.61.0" ,
10- "react-native-safe-area-context" : " ^0.6 .0"
10+ "react-native-safe-area-context" : " ^0.7 .0"
1111 },
1212 "repository" : " https://github.com/reason-react-native/safe-area-context.git" ,
1313 "license" : " MIT" ,
3838 "release" : " npmpub"
3939 },
4040 "devDependencies" : {
41- "bs-platform" : " ^5 .2.0" ,
41+ "bs-platform" : " ^7 .2.0" ,
4242 "husky" : " ^1.3.0" ,
4343 "lint-staged" : " ^8.1.0" ,
4444 "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-
71type insets = {
82 .
93 "top": float ,
@@ -12,6 +6,17 @@ type insets = {
126 "right": float ,
137};
148
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+
1520[@ bs . module "react-native-safe-area-context" ]
1621external useSafeArea : unit => insets = "useSafeArea" ;
1722
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -173,10 +173,10 @@ braces@^2.3.1:
173173 split-string "^3.0.2"
174174 to-regex "^3.0.1"
175175
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 ==
180180
181181cache-base@^1.0.1 :
182182 version "1.0.1"
You can’t perform that action at this time.
0 commit comments