sandstone/ Contextual Menu Decorator
A decorator for adding contextual menus to components.
import ContextualMenuDecorator from '@enact/sandstone/ContextualMenuDecorator';Members
ContextualMenuDecoratorHigher-Order Component
Wraps a component to display a contextual popup menu.
import ContextualMenuDecorator from '@enact/sandstone/ContextualMenuDecorator';Configuration
Disables passing the
skinprop to the wrapped component.Default: falseThe prop in which to pass the value of
openstate of ContextualMenuDecorator to the wrapped component.Default: 'selected'
Properties added to wrapped component
- direction
Direction of popup with respect to the wrapped component.
Default: 'below right'Offset from the activator to apply to the position of the popup.
Default: 'overlap'Called when the user has attempted to close the popup.
This may occur either when the close button is clicked or when spotlight focus moves outside the boundary of the popup. Setting
spotlightRestrictto'self-only'will prevent Spotlight focus from leaving the popup.Called when the popup is opened.
CSS class name to pass to the ContextualPopup.
This is commonly used to set width and height of the popup.
An object containing properties to be passed to popup component.
Restricts or prioritizes spotlight navigation.
Allowed values are:
'none'- Spotlight can move freely within and beyond the popup'self-first'- Spotlight should prefer components within the popup over components beyond the popup, or'self-only'- Spotlight can only be set within the popup
Default: 'self-only'