Constructor
new MenuItem(props)
Instantiates a new MenuItem
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties to initialize the menu item with. Properties
|
Members
alt :string
Alternative text if media cannot be downloaded .
card :Card
Sets a card object.
description :string
The displayed text of a menu item.
method :string
The HTTP method called when the menu item is selected.
onLoginFailure :string
Optional path to call on login failure, used when type='login'.
onLoginSuccess :string
Optional path to call on login success, used when type='login'.
onLogoutFailure :string
Optional path to call on logout failure, used when type='login'.
onLogoutSuccess :string
Optional path to call on logout success, used when type='login'.
path :string
The path called when the menu item is selected.
src :string
A public link to media file of type jpg|png|mp4 .
textSearch :string
Field to add more context for searching in options.
(readonly) type :string
The type of the menu item (content
or option
).
Methods
(static) fromTag(tag) → {MenuItem}
Creates a MenuItem from a SectionTag's child
Parameters:
Name | Type | Description |
---|---|---|
tag |
LiTag | BrTag | PTag | LoginTag | LogoutTag | string |