m3e/nav_item
NavItem is an item, placed in a navigation bar or rail, used to navigate to destinations in an application.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
disabled: Disabled,
disabled_interactive: DisabledInteractive,
download: option.Option(String),
href: String,
orientation: nav_item_orientation.NavItemOrientation,
rel: String,
selected: Selected,
target: option.Option(link_target.LinkTarget),
)
}
Constructors
-
Config( disabled: Disabled, disabled_interactive: DisabledInteractive, download: option.Option(String), href: String, orientation: nav_item_orientation.NavItemOrientation, rel: String, selected: Selected, target: option.Option(link_target.LinkTarget), )
Disabled is a value indicating whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
DisabledInteractive is a value indicating whether the element is disabled and interactive.
pub type DisabledInteractive {
IsDisabledInteractive
IsNotDisabledInteractive
}
Constructors
-
IsDisabledInteractive -
IsNotDisabledInteractive
NavItem is a View Model for this component
Fields:
- disabled: A value indicating whether the element is disabled.
- disabled_interactive: A value indicating whether the element is disabled and interactive.
- download: A value indicating 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.
- orientation: The layout orientation of the item.
- rel: The relationship between the
targetof the link button and the document. - selected: A value indicating whether the element is selected.
- target: The target of the link button.
pub opaque type NavItem
Selected is a value indicating whether the element 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_disabled_interactive: DisabledInteractive
pub const default_download: option.Option(String)
pub const default_href: String
pub const default_orientation: nav_item_orientation.NavItemOrientation
pub const default_rel: String
pub const default_selected: Selected
pub const default_target: option.Option(link_target.LinkTarget)
pub fn disabled(record: NavItem, disabled: Disabled) -> NavItem
disabled sets the value of disabled for this NavItem.
pub fn disabled_interactive(
record: NavItem,
disabled_interactive: DisabledInteractive,
) -> NavItem
disabled_interactive sets the value of disabled_interactive for this NavItem.
pub fn download(
record: NavItem,
download: option.Option(String),
) -> NavItem
download sets the value of download for this NavItem.
pub fn from_config(config: Config) -> NavItem
from_config creates a new NavItem from the given configuration.
pub fn orientation(
record: NavItem,
orientation: nav_item_orientation.NavItemOrientation,
) -> NavItem
orientation sets the value of orientation for this NavItem.
pub fn render(
model: NavItem,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a NavItem
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 NavItem Config
pub fn selected(record: NavItem, selected: Selected) -> NavItem
selected sets the value of selected for this NavItem.
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name
pub fn target(
record: NavItem,
target: option.Option(link_target.LinkTarget),
) -> NavItem
target sets the value of target for this NavItem.