m3e/button_segment
ButtonSegment is a option that can be selected within a segmented button.
This file was generated by m3e/generator
DO NOT EDIT
Types
ButtonSegment is a View Model for this component
Fields:
- checked: Whether the element is checked.
- disabled: Whether the element is disabled.
- value: A string representing the value of the segment.
pub opaque type ButtonSegment
Checked is whether the element is checked.
pub type Checked {
IsChecked
IsNotChecked
}
Constructors
-
IsChecked -
IsNotChecked
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
Values
pub fn checked(
record: ButtonSegment,
checked: Checked,
) -> ButtonSegment
checked sets the value of checked for this ButtonSegment.
pub const default_checked: Checked
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_value: String
pub fn disabled(
record: ButtonSegment,
disabled: Disabled,
) -> ButtonSegment
disabled sets the value of disabled for this ButtonSegment.
pub fn from_config(config: Config) -> ButtonSegment
from_config creates a new ButtonSegment from the given configuration.
pub fn new() -> ButtonSegment
new creates a new ButtonSegment with the default configuration.
pub fn render(
model: ButtonSegment,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a ButtonSegment
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 ButtonSegment Config
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name
pub fn value(
record: ButtonSegment,
value: String,
) -> ButtonSegment
value sets the value of value for this ButtonSegment.