Skip to content

Commit

Permalink
4.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddy03h committed Oct 25, 2024
1 parent a1dc675 commit 4b05fa1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog of `@rescript-react-native/safe-area-context`

## 4.6.0 - 2024-10-25

- update to rescript 11 and rescript-react-native 0.73 [f2c6ed3](https://github.com/rescript-react-native/rescript-react-native/commit/f2c6ed3) by [Freddy03h](https://github.com/Freddy03h)
- update SafeAreaView edges prop to use [edgeMode](https://github.com/th3rdwave/react-native-safe-area-context?tab=readme-ov-file#edges) [a1dc675](https://github.com/rescript-react-native/rescript-react-native/commit/a1dc675) by [Freddy03h](https://github.com/Freddy03h)

## 4.1.0 - 2024-04-08

- rescript 10, @rescript/react 11 and jsx 4 [#9](https://github.com/rescript-react-native/safe-area-context/pull/9) by [@DCKT](https://github.com/DCKT)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ See <https://github.com/th3rdwave/react-native-safe-area-context#optimization>
open ReactNative;
open ReactNativeSafeAreaContext;
[@react.component]
@react.component
let make = () => {
<SafeAreaProvider /*initialMetrics={...}*/>
// your app...
Expand All @@ -108,7 +108,7 @@ See <https://github.com/th3rdwave/react-native-safe-area-context#web-ssr> for
open ReactNative;
open ReactNativeSafeAreaContext;
[@react.component]
@react.component
let make = () => {
let insets = useSafeAreaInsets();
<View style=Style.(style(~paddingTop=insets.top, ())) />;
Expand All @@ -121,7 +121,7 @@ let make = () => {
open ReactNative;
open ReactNativeSafeAreaContext;
[@react.component]
@react.component
let make = () => {
let frame = useSafeAreaFrame();
<View style=Style.(style(~height=frame.height, ())) />;
Expand All @@ -134,7 +134,7 @@ let make = () => {
open ReactNative;
open ReactNativeSafeAreaContext;
[@react.component]
@react.component
let make = () => {
<SafeAreaInsetsContext.Consumer>
// your component, handy for classes
Expand All @@ -149,7 +149,7 @@ let make = () => {
open ReactNative;
open ReactNativeSafeAreaContext;
[@react.component]
@react.component
let make = () => {
<SafeAreaView>
<View />
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@rescript-react-native/safe-area-context",
"description": "ReScript bindings for react-native-safe-area-context.",
"version": "4.1.0",
"version": "4.6.0",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"react-native-safe-area-context": ">=4.1.0",
"react-native-safe-area-context": ">=4.6.0",
"@rescript/react": ">=0.12.0",
"rescript-react-native": ">=0.73.1"
},
Expand Down

0 comments on commit 4b05fa1

Please sign in to comment.