MenuItem
This component is made to be used with the menu
component. This will ensure that the styling is correct and that the menu items are properly sized.
Examples
Simple menuItem
{
"type": "menuItem",
"text": "Simple menuItem",
}
MenuItem icon & on pressed
But you can customize the look of your items or set an listener like in any other actionable.
{
"type": "menuItem",
"text": "Menu Item",
"icon": {
"type": "icon",
"value": "abc",
},
"onPressed": {
"_type": "listener",
"name": "pressed"
}
}
Properties
Attribute | Description | Type |
---|---|---|
_type | The type of the element |
|
text | The text of the element | string |
disabled | Whether the element should be disabled or not. | boolean |
icon | The Icon to use | Icon |
isSelected | Whether the element is selected or not. | boolean |
onPressed | Listener |