Skip to content

Commit

Permalink
docs: add edgeToEdge guide
Browse files Browse the repository at this point in the history
  • Loading branch information
lodev09 committed Dec 12, 2024
1 parent fc57d2f commit 6c00cd5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/docs/guides/edge2edge.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Enable edge-to-edge
description: Turning on edge-to-edge support for Android.
keywords: [bottom sheet edge-to-edge, edge-to-edge, android]
---

Yes! TrueSheet does support [`edge-to-edge`](https://developer.android.com/develop/ui/views/layout/edge-to-edge).

## How?

It's easy, just set [`edgeToEdge`](/reference/props#edgetoedge) to `true`.

```tsx {3}
const App = () => {
return (
<TrueSheet edgeToEdge={true}>
<View />
</TrueSheet>
)
}
```

## react-native-edge-to-edge

[`react-native-edge-to-edge`](https://github.com/zoontek/react-native-edge-to-edge) is a cool tiny package that lets you effortlessly enable `edge-to-edge` display for your app. Go check it out!
8 changes: 8 additions & 0 deletions docs/docs/reference/01-props.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ Shows a grabber (or handle). Native on IOS and styled `View` on Android.
| - | - | - | - |
| `boolean` | `true` |||

### `edgeToEdge`

Supports edge-to-edge on Android. Turn this on if your app has it enabled.

| Type | Default | 🍎 | 🤖 |
| - | - | - | - |
| `boolean` | | ||

### `grabberProps`

Overrides the grabber props for android.
Expand Down
1 change: 1 addition & 0 deletions src/TrueSheet.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export interface TrueSheetProps extends ViewProps {

/**
* Supports edge-to-edge on Android.
* Turn this on if your app has it enabled.
*
* @platform android
*/
Expand Down

0 comments on commit 6c00cd5

Please sign in to comment.