From 6c00cd5d96bffd29ca752aacafceac6f1930663a Mon Sep 17 00:00:00 2001 From: lodev09 Date: Fri, 13 Dec 2024 02:15:46 +0800 Subject: [PATCH] docs: add edgeToEdge guide --- docs/docs/guides/edge2edge.mdx | 25 +++++++++++++++++++++++++ docs/docs/reference/01-props.mdx | 8 ++++++++ src/TrueSheet.types.ts | 1 + 3 files changed, 34 insertions(+) create mode 100644 docs/docs/guides/edge2edge.mdx diff --git a/docs/docs/guides/edge2edge.mdx b/docs/docs/guides/edge2edge.mdx new file mode 100644 index 0000000..d518048 --- /dev/null +++ b/docs/docs/guides/edge2edge.mdx @@ -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 ( + + + + ) +} +``` + +## 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! diff --git a/docs/docs/reference/01-props.mdx b/docs/docs/reference/01-props.mdx index c04a0f1..bd1b527 100644 --- a/docs/docs/reference/01-props.mdx +++ b/docs/docs/reference/01-props.mdx @@ -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. diff --git a/src/TrueSheet.types.ts b/src/TrueSheet.types.ts index 957efea..08b968f 100644 --- a/src/TrueSheet.types.ts +++ b/src/TrueSheet.types.ts @@ -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 */