m3e/list_option
list_option provides Lustre support for the M3E List Option component
Types
Config is the configuration of a ListOption
pub type Config {
Config(disabled: Bool, selected: Bool)
}
Constructors
-
Config(disabled: Bool, selected: Bool)
ListOption represents a selectable item within a list container
Fields:
- disabled: Whether the element is disabled
- selected: Whether the element is selected
pub opaque type ListOption
Values
pub fn default_config() -> Config
default_config creates a Config with default values
pub fn disabled(lo: ListOption, disabled: Bool) -> ListOption
disabled sets the disabled field
pub fn from_config(config: Config) -> ListOption
from_config creates a ListOption from a Config
Parameters:
- config: a Config
pub fn render(
lo: ListOption,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element from a ListOption
Parameters:
- lo: a ListOption
- attributes: a list of additional Attributes
- children: the main content
pub fn render_config(
config: Config,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element directly from a Config
Parameters:
- config: a Config
pub fn selected(lo: ListOption, selected: Bool) -> ListOption
selected sets the selected field
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot creates a Lustre ‘slot’ Attribute(msg) for a Slot