You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding Unavailable Menu Item docs
* removing similar text
* rewording two concepts
* fix spelling mistakes
Co-authored-by: Michael Jordan <[email protected]>
* Adding more explanation in a couple cases
* using the Unavailable Items as the name
* switching the order of two paragraphs
* update docs and types
* fix props table
* update types and docs table
* address review comments
---------
Co-authored-by: Michael Jordan <[email protected]>
Co-authored-by: Reid Barber <[email protected]>
Co-authored-by: Daniel Lu <[email protected]>
Co-authored-by: Robert Snow <[email protected]>
ContextualHelpTrigger disables a menu item's action and replaces it with a popover with information on why the item is unavailable and may link users to more information elsewhere.
128
+
129
+
The ContextualHelpTrigger accepts exactly
130
+
two children: the Item which triggers opening of the Dialog and the Dialog itself. The trigger must be
131
+
the first child passed into the ContextualHelpTrigger and should be an Item. Similar to
132
+
ContextualHelp, the layout of the Dialog is very deliberate. See [ContextualHelp](ContextualHelp.html#content) for further explanation.
133
+
134
+
By default, a ContextualHelpTrigger's Dialog is opened by hovering, pressing the trigger element or activating
135
+
it via the <Keyboard>Space</Keyboard>, <Keyboard>Enter</Keyboard>, or <Keyboard>Right Arrow</Keyboard> keys.
136
+
Hovering another item or pressing the <Keyboard>Esc</Keyboard> key will close the Dialog and leave the Menu open.
137
+
138
+
Setting the `isUnavailable` prop on the ContextualHelpTrigger makes a Menu Item unavailable and enables the Dialog with contextual help, allowing for programmatic control.
139
+
140
+
Note that the Menu's `onAction` and `onSelectionChange`
141
+
callbacks will not fire for items made unavailable by a ContextualHelpTrigger.
142
+
143
+
The example below illustrates how one would setup a MenuTrigger to use ContextualHelpTrigger.
0 commit comments