Skip to content

Commit 3ec2ff3

Browse files
authored
chore(docs): fix typo in SafeAreaView api reference (#718)
* fix: typo * rethinking
1 parent 843e5b9 commit 3ec2ff3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/docs/api/safe-area-view.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ For example if you don't want insets to apply to the top edge because the view d
3838
<SafeAreaView edges={['right', 'bottom', 'left']} />
3939
```
4040

41-
Optionally it can be set to an object `{ top?: EdgeMode, right?: EdgeMode, bottom?: EdgeMode, left?: EdgeMode }` where `EdgeMode = 'off' | 'additive' | 'maximum'`. Additive is a default mode and is the same as passing and edge in the array: `finalPadding = safeArea + padding`. Maximum mode will use safe area inset or padding/margin (depends on `mode`) if safe area is less: `finalPadding = max(safeArea, padding)`. For example if you want a floating UI element that should be at the bottom safe area edge on devices with safe area or 24px from the bottom of the screen on devices without safe area or if safe area is less than 24px:
41+
Optionally it can be set to an object `{ top?: EdgeMode, right?: EdgeMode, bottom?: EdgeMode, left?: EdgeMode }` where `EdgeMode = 'off' | 'additive' | 'maximum'`. Additive is a default mode and is the same as passing an edge in the array: `finalPadding = safeArea + padding`. Maximum mode will use safe area inset or padding/margin (depends on `mode`) if safe area is less: `finalPadding = max(safeArea, padding)`. For example if you want a floating UI element that should be at the bottom safe area edge on devices with safe area or 24px from the bottom of the screen on devices without safe area or if safe area is less than 24px:
4242

4343
```tsx
4444
<SafeAreaView style={{paddingBottom: 24}} edges={{bottom: 'maximum'}} />

0 commit comments

Comments
 (0)