m3e/slider_thumb
SliderThumb is a thumb used to select a value in a slider.
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,
name: String,
value: option.Option(Float),
)
}
Constructors
-
Config( disabled: Disabled, name: String, value: option.Option(Float), )
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
SliderThumb is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- name: The name that identifies the element when submitting the associated form.
- value: The value of the thumb.
pub opaque type SliderThumb
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_name: String
pub const default_value: option.Option(Float)
pub fn disabled(
record: SliderThumb,
disabled: Disabled,
) -> SliderThumb
disabled sets the value of disabled for this SliderThumb.
pub fn from_config(config: Config) -> SliderThumb
from_config creates a new SliderThumb from the given configuration.
pub fn name(record: SliderThumb, name: String) -> SliderThumb
name sets the value of name for this SliderThumb.
pub fn render(
model: SliderThumb,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a SliderThumb
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a SliderThumb Config
pub fn value(
record: SliderThumb,
value: option.Option(Float),
) -> SliderThumb
value sets the value of value for this SliderThumb.