🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-safe-area

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-safe-area - npm Package Compare versions

Comparing version

to
0.4.2

9

lib/withSafeArea.js

@@ -86,4 +86,11 @@ // @flow

get _injectedProps(): Props {
const { top, bottom, left, right } = this.state.safeAreaInsets
const isVerticalInverted = this.props.inverted && !this.props.horizontal
const isHorizontalInverted = this.props.inverted && this.props.horizontal
const { safeAreaInsets } = this.state
const top = !isVerticalInverted ? safeAreaInsets.top : safeAreaInsets.bottom
const bottom = !isVerticalInverted ? safeAreaInsets.bottom : safeAreaInsets.top
const left = !isHorizontalInverted ? safeAreaInsets.left : safeAreaInsets.right
const right = !isHorizontalInverted ? safeAreaInsets.right : safeAreaInsets.left
if (applyTo === 'contentInset') {

@@ -90,0 +97,0 @@ const contentInset = this.props.contentInset || {}

2

package.json
{
"name": "react-native-safe-area",
"version": "0.4.1",
"version": "0.4.2",
"description": "React Native module to get Safe Area Insets for iOS 11 or later",

@@ -5,0 +5,0 @@ "main": "lib/index",

@@ -67,3 +67,3 @@ # react-native-safe-area

```jsx
const SafeAreaView = withSafeArea(View, 'margin', 'both')
const SafeAreaView = withSafeArea(View, 'margin', 'all')

@@ -70,0 +70,0 @@ class App extends Component<{}> {