From 00e14d79b14b68454436154dca0fbf5d7c177ca1 Mon Sep 17 00:00:00 2001
From: Dominic Go <18517029+dominicstop@users.noreply.github.com>
Date: Thu, 7 Jul 2022 05:48:34 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Update=20README=20-=20`C?=
=?UTF-8?q?ontextMenuViewExample15`?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 97ab227..1b922f3 100644
--- a/README.md
+++ b/README.md
@@ -1764,7 +1764,7 @@ export function ContextMenuViewExample13(props) {
| Notes |
| ------------------------------------------------------------ |
-| 📝 **Note A**: By default, `MenuPreviewConfig.preferredCommitStyle` is set to `'dismiss'`.
📝 **Note B**: A `preferredCommitStyle` of `'pop'`' is usually used when navigating to another screen (i.e. a view controller is pushed without the normal push transition). |
+| The `MenuPreviewConfig.preferredCommitStyle` allows you to configure what preset exit transition to use when the context menu preview is pressed.
📝 **Note A**: By default, `MenuPreviewConfig.preferredCommitStyle` is set to `'dismiss'`.
📝 **Note B**: A `preferredCommitStyle` of `'pop'`' is usually used when navigating to another screen (i.e. a view controller is pushed without the normal push transition). |
@@ -1801,13 +1801,13 @@ export function ContextMenuViewExample14(props) {
### `ContextMenuView` Example 15
-**Summary**: TBA
+**Summary**: An example showing how to configure a context menu that uses targeted previews.
-| Notes |
-| ------------------------ |
-| TBA
📝 **Note A**: |
+| Notes |
+| ------------------------------------------------------------ |
+| By default, the child elements you render inside the `ContextMenuView` component will be used as the preview when the context menu interaction is triggered.
Targeted previews allows you to specify which specific view to use for the context menu preview, so that when the context menu interaction begins, a different view will be used for the preview (including the initial transition, see the gif below the example).
📝 **Note A**: The context menu interaction will still be triggered by long pressing on the child elements in the `ContextMenuView` component.
As such, if the view that you are using for the targeted preview is not a child of `ContextMenuView`, then holding down on that view will not trigger the context menu interaction.
📝 **Note B**: Targeted previews is different from setting a [custom context menu preview](#ContextMenuView-Example-11) via the `renderPreview` prop.
A custom context menu preview will replace the preview content entirely with your custom preview, while a targeted preview on the other hand will change which view to use for the context menu entrance/exit transition (as well as what view to show in the preview if you do not have a custom preview). |
@@ -1831,13 +1831,10 @@ export function ContextMenuViewExample15(props) {
return (