m3e/step

step provides Lustre support for the M3E Step component

Types

Whether the step has been completed

pub type Completed {
  Completed
  NotCompleted
}

Constructors

  • Completed
  • NotCompleted

Config is a record that contains all of the configurable options for a Step

pub type Config {
  Config(
    completed: Completed,
    disabled: state.Interaction,
    editable: Editable,
    for: String,
    optional: Optional,
    selected: Selected,
    text: String,
  )
}

Constructors

Whether the step is editable and users can return to it after completion

pub type Editable {
  Editable
  NotEditable
}

Constructors

  • Editable
  • NotEditable

Whether the step is optional

pub type Optional {
  Optional
  NotOptional
}

Constructors

  • Optional
  • NotOptional

Whether the element is selected

pub type Selected {
  Selected
  NotSelected
}

Constructors

  • Selected
  • NotSelected

Slot gives type-safe names to each of the defined HTML named slots

pub type Slot {
  DoneIcon
  EditIcon
  Error
  ErrorIcon
  Hint
  Icon
}

Constructors

  • DoneIcon
  • EditIcon
  • Error
  • ErrorIcon
  • Hint
  • Icon

Step provides Lustre support for the [M3E Step component

Fields:

  • completed: Whether the step has been completed
  • disabled: Whether the element is disabled
  • editable: Whether the step is editable and users can return to it after completion
  • for: The identifier of the interactive control to which this element is attached
  • optional: Whether the step is optional
  • selected: Whether the element is selected
  • text: The text to display in the step
pub opaque type Step

Values

pub fn completed(s: Step, completed: Bool) -> Step

completed sets the completed field

pub const default_completed: Completed
pub fn default_config(for: String) -> Config

default_config creates a default Config for a Step

pub const default_editable: Editable
pub const default_optional: Optional
pub const default_selected: Selected
pub fn disabled(s: Step, disabled: Bool) -> Step

disabled sets the disabled field

pub fn editable(s: Step, editable: Bool) -> Step

editable sets the editable field

pub fn for_(s: Step, for: String) -> Step

for sets the for field

pub fn from_config(config: Config) -> Step

from_config creates a new Step from a Config

pub fn new(for: String) -> Step

new creates a new Step

pub fn optional(s: Step, optional: Bool) -> Step

optional sets the optional field

pub fn render(
  s: Step,
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element(msg) from a Step

pub fn render_config(
  config: Config,
  children: List(element.Element(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element(msg) from a Config

pub fn selected(s: Step, selected: Bool) -> Step

selected sets the selected field

pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot creates a Lustre ‘slot’ Attribute(msg) for a Slot

pub fn text(s: Step, text: String) -> Step

text sets the text field

Search Document