You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This is a JS-only version of SafeAreaView that will be available in React Native
4
4
5
5
## Usage
6
6
7
-
Wrap components that touch any edge of the screen with SafeAreaView.
7
+
Wrap components that touch any edge of the screen with SafeAreaView.
8
8
9
9
```jsx
10
10
<SafeAreaView>
@@ -16,7 +16,7 @@ Wrap components that touch any edge of the screen with SafeAreaView.
16
16
17
17
### forceInset
18
18
19
-
Sometimes you will observe unexpected behavior and jank because SafeAreaView uses `onLayout` then calls `measureInWindow` on the view. If you know your view will touch certain edges, use `forceInset` to force it to apply the inset padding on the view.
19
+
Sometimes you will observe unexpected behavior and jank because SafeAreaView uses `onLayout` then calls `measureInWindow` on the view. If you know your view will touch certain edges, use `forceInset` to force it to apply the inset padding on the view.
20
20
21
21
```jsx
22
22
<SafeAreaView forceInset={{ top: 'always' }}>
@@ -27,3 +27,14 @@ Sometimes you will observe unexpected behavior and jank because SafeAreaView use
27
27
```
28
28
29
29
`forceInset` takes an object with the keys `top | bottom | left | right | vertical | horizontal` and the values `'always' | 'never'`. Or you can override the padding altogether by passing an integer.
30
+
31
+
### With HOC
32
+
33
+
Sometimes you would prefer to use a higher-order component to wrap components.
0 commit comments