m3e/menu_item
MenuItem is an item of a menu.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
disabled: Disabled,
download: option.Option(String),
href: String,
rel: String,
target: option.Option(link_target.LinkTarget),
)
}
Constructors
-
Config( disabled: Disabled, download: option.Option(String), href: String, rel: String, target: option.Option(link_target.LinkTarget), )
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
MenuItem is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- download: Whether the
targetof the link button will be downloaded, optionally specifying the new name of the file. - href: The URL to which the link button points.
- rel: The relationship between the
targetof the link button and the document. - target: The target of the link button.
pub opaque type MenuItem
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_download: option.Option(String)
pub const default_href: String
pub const default_rel: String
pub const default_target: option.Option(link_target.LinkTarget)
pub fn disabled(record: MenuItem, disabled: Disabled) -> MenuItem
disabled sets the value of disabled for this MenuItem.
pub fn download(
record: MenuItem,
download: option.Option(String),
) -> MenuItem
download sets the value of download for this MenuItem.
pub fn from_config(config: Config) -> MenuItem
from_config creates a new MenuItem from the given configuration.
pub fn href(record: MenuItem, href: String) -> MenuItem
href sets the value of href for this MenuItem.
pub fn render(
model: MenuItem,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a MenuItem
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 MenuItem Config
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name
pub fn target(
record: MenuItem,
target: option.Option(link_target.LinkTarget),
) -> MenuItem
target sets the value of target for this MenuItem.