m3e/nav_menu_item
NavMenuItem is an expandable item, selectable item within a navigation menu.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
NavMenuItem is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- open: Whether the item is expanded.
- selected: Whether the item is selected.
pub opaque type NavMenuItem
Open is whether the item is expanded.
pub type Open {
IsOpen
IsNotOpen
}
Constructors
-
IsOpen -
IsNotOpen
Selected is whether the item is selected.
pub type Selected {
IsSelected
IsNotSelected
}
Constructors
-
IsSelected -
IsNotSelected
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_open: Open
pub const default_selected: Selected
pub fn disabled(
record: NavMenuItem,
disabled: Disabled,
) -> NavMenuItem
disabled sets the value of disabled for this NavMenuItem.
pub fn from_config(config: Config) -> NavMenuItem
from_config creates a new NavMenuItem from the given configuration.
pub fn open(record: NavMenuItem, open: Open) -> NavMenuItem
open sets the value of open for this NavMenuItem.
pub fn render(
model: NavMenuItem,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a NavMenuItem
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a NavMenuItem Config
pub fn selected(
record: NavMenuItem,
selected: Selected,
) -> NavMenuItem
selected sets the value of selected for this NavMenuItem.
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name