From 58cd1c608102a50cbb11db1935c9d7fc7fb8aa8b Mon Sep 17 00:00:00 2001 From: Dominic Go <18517029+dominicstop@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:18:23 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Update=20README=20-=20`C?= =?UTF-8?q?ontextMenuViewExample08`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f50681f..7813984 100644 --- a/README.md +++ b/README.md @@ -1398,6 +1398,16 @@ export function ContextMenuViewExample07(props) { ### `ContextMenuView` Example 08 +**Summary**: A context menu with 3 actions that has `'on'`, `'off'`, and `'mixed'` `menuState`.
+ +
+ +| Notes | +| ------------------------------------------------------------ | +| You can set an menu action item's the menu state via the `MenuActionConfig.menuState` property.

📝 **Note**: On iOS 13, an action item's menu state is indicated via changing it's icon to a checkmark. However on later version of iOS this behavior has been changed to showing a checkmark besides the action title (see gifs/screenshots below). | + +
+ [🔗 Full Example](example/src/examples/ContextMenuViewExample08.tsx) ```jsx @@ -1412,33 +1422,21 @@ export function ContextMenuViewExample08(props) { menuItems: [{ actionKey : 'key-01', actionTitle: 'menuState: on', - menuState : 'on', - icon: { - type: 'IMAGE_SYSTEM', - imageValue: { - systemName: 'folder', - }, - } + // show a checkmark + menuState: 'on', + // ... }, { actionKey : 'key-02' , actionTitle: 'menuState: off', - menuState : 'off', - icon: { - type: 'IMAGE_SYSTEM', - imageValue: { - systemName: 'dial', - }, - } + // no checkmark + menuState: 'off', + // ... }, { actionKey : 'key-03' , actionTitle: 'menuState: mixed', - menuState : 'mixed', - icon: { - type: 'IMAGE_SYSTEM', - imageValue: { - systemName: 'archivebox', - }, - } + // visually this is the same as 'on' + menuState: 'mixed', + // ... }], }} >