Skip to content

Releases: AppAndFlow/react-native-safe-area-context

v3.0.0

30 May 23:31
Compare
Choose a tag to compare

Breaking changes

  • SafeAreaView insets are now relative to the nearest SafeAreaProvider. This brings the behaviour back to what it was in v1.0
  • SafeAreaView prop emulateUnlessSupported has been removed.

Improvements

  • SafeAreaView has a new mode prop to control if insets should be applied as padding or margin. (#85)

v2.0.3

26 May 20:32
Compare
Choose a tag to compare
  • Fix initialWindowMetrics (80829e0)

v2.0.2

26 May 20:31
Compare
Choose a tag to compare
  • Add missing UIKit import (#86)

v2.0.1

25 May 18:23
Compare
Choose a tag to compare
  • Fix nested SafeAreaViews (#84)

v2.0.0

22 May 22:34
Compare
Choose a tag to compare

Breaking

  • SafeAreaView padding is now additive to insets
  • Native code changes, make sure to rebuild your app!

Improvements

  • SafeAreaView is now implemented natively on both iOS and Android. Thanks to @jacobp100 (#78)
  • Fix bottom inset when keyboard is opened on Android

v1.0.0

09 May 17:53
Compare
Choose a tag to compare

Breaking

  • Insets on android are now relative to the Provider view instead of the activity content view. This is consistent with iOS.
  • SafeAreaContext was renamed to SafeAreaInsetsContext.

Deprecations

  • useSafeArea is deprecated, use useSafeAreaInsets instead.
  • SafeAreaConsumer is deprecated, use SafeAreaInsetsContext.Consumer instead.
  • initialWindowSafeAreaInsets is deprecated, use initialWindowMetrics instead.
  • SafeAreaProvider prop initialWindowSafeAreaInsets is deprecated, use initialMetrics instead.

New

  • useSafeAreaFrame hook and SafeAreaFrameContext to access the frame of the nearest SafeAreaProvider.
  • withSafeAreaInsets HOC

Fixed

  • Insets should be more accurate on devices using API < 20

v0.7.2

06 Feb 20:40
Compare
Choose a tag to compare
  • Fix when using jest (c13fbc9)
  • Fix an android compilation error (62c75c2)

v0.7.0

05 Feb 23:29
Compare
Choose a tag to compare
  • Add a constant for initial window insets (0f54200, 0baefa5)
  • Fix top insets when using pan keyboard mode on Android (f0228a9)

v0.6.3

30 Jan 18:22
Compare
Choose a tag to compare
  • Fix compat with yarn v2 by adding a missing peer dep (9c8ec27)

v0.6.0

04 Nov 20:46
Compare
Choose a tag to compare
  • Nested providers are supported again. This is useful to support screens that do not cover the whole viewport like for example the new iOS 13 modal. (e1cafde)