-
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
402ce5e
commit 5481ef2
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Handling SafeArea | ||
|
||
There are two main props that will come in handy when dealing with `SafeArea` in the action sheet. | ||
|
||
The first one is `useBottomSafeAreaPadding`. This prop uses the top padding as a reference to calculate the bottom padding on mobile to Views do not hide under the Navigation Bar. | ||
|
||
```tsx | ||
<ActionSheet useBottomSafeAreaPadding /> | ||
``` | ||
|
||
The second one is `drawUnderStatusBar`. This is useful for action sheets that cover full screen. In that case, the sheet will grow under the StatusBar by default. However you can set this to `false` if you don't want that default behavior. | ||
|
||
```tsx | ||
<ActionSheet drawUnderStatusBar={false} /> | ||
``` | ||
|
||
If you are using `react-native-safe-area-context` library in your project you can also do the following: | ||
|
||
```tsx | ||
const insets = useSafeAreaInsets(); | ||
|
||
return ( | ||
<ActionSheet | ||
containerStyle={{ | ||
paddingBottom: insets.bottom, | ||
}}></ActionSheet> | ||
); | ||
``` |
5481ef2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
rnas – ./
rnas-ammarahm-ed.vercel.app
rnas-git-master-ammarahm-ed.vercel.app
rnas.vercel.app