From 337cdcb6893953d84418e8b86f8f908a05e982fb Mon Sep 17 00:00:00 2001
From: Dominic Go <18517029+dominicstop@users.noreply.github.com>
Date: Sun, 3 Jul 2022 14:01:54 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Docs:=20Update=20README=20-=20`C?=
=?UTF-8?q?ontextMenuViewExample06`?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 40 ++++++++++++++++------------------------
1 file changed, 16 insertions(+), 24 deletions(-)
diff --git a/README.md b/README.md
index 85e2752..27feb1a 100644
--- a/README.md
+++ b/README.md
@@ -1275,6 +1275,16 @@ export function ContextMenuViewExample05(props) {
### `ContextMenuView` Example 06
+**Summary**: A context menu that has a destructive submenu.
+
+
+
+| Notes |
+| ------------------------------------------------------------ |
+| You can set the menu options via the `MenuConfig.menuOptions` property. It accepts an array of `UIMenuOptions` strings (e.g. `destructive`, `displayInline`).
If you pass in `['destructive']` to `menuOptions`, it will tint the submenu to red (but it's menu items won't be affected). |
+
+
+
[🔗 Full Example](example/src/examples/ContextMenuViewExample06.tsx)
```jsx
@@ -1289,42 +1299,24 @@ export function ContextMenuViewExample06(props) {
menuItems: [{
actionKey : 'key-01',
actionTitle: 'Action #1',
- icon: {
- type: 'IMAGE_SYSTEM',
- imageValue: {
- systemName: 'folder',
- },
- }
+ // ...
}, {
menuTitle: 'Submenu...',
+ // Create an "destructive" submenu by adding
+ // `destructive` in the menu options...
menuOptions: ['destructive'],
menuItems: [{
actionKey : 'key-01-01',
actionTitle: 'Submenu Action #1',
- icon: {
- type: 'IMAGE_SYSTEM',
- imageValue: {
- systemName: 'star',
- },
- }
+ // ...
}, {
actionKey : 'key-01-02',
actionTitle: 'Submenu Action #2',
- icon: {
- type: 'IMAGE_SYSTEM',
- imageValue: {
- systemName: 'star.lefthalf.fill',
- },
- }
+ // ...
}, {
actionKey : 'key-01-03',
actionTitle: 'Submenu Action #3',
- icon: {
- type: 'IMAGE_SYSTEM',
- imageValue: {
- systemName: 'star.fill',
- },
- }
+ // ...
}]
}],
}}