m3e/option
option provides Lustre support for the M3E Option component
Types
Config holds the configuration for an Option
pub type Config {
Config(
interaction: types.Interaction,
selection: types.SelectionState,
value: option.Option(String),
)
}
Constructors
-
Config( interaction: types.Interaction, selection: types.SelectionState, value: option.Option(String), )
Values
pub fn default_config() -> Config
default_config creates a new Config with default values
pub fn disabled(
o: Option,
interaction: types.Interaction,
) -> Option
disabled sets the interaction field
pub fn render(
o: Option,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates an M3E Option component from an Option
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
pub fn selected(
o: Option,
selection: types.SelectionState,
) -> Option
selected sets the selection field
pub fn value(o: Option, value: option.Option(String)) -> Option
value sets the value field