m3e/stepper
stepper provides Lustre support for the M3E Stepper component
Types
Config holds the configuration for a Stepper
pub type Config {
Config(
header_position: HeaderPosition,
label_position: LabelPosition,
linear: LinearValidity,
orientation: Orientation,
)
}
Constructors
-
Config( header_position: HeaderPosition, label_position: LabelPosition, linear: LinearValidity, orientation: Orientation, )
HeaderPosition is the position of the step header, when oriented horizontally.
pub type HeaderPosition {
Above
Below
}
Constructors
-
Above -
Below
LabelPosition is the position of the step labels, when oriented horizontally.
pub type LabelPosition {
LabelBelow
LabelEnd
}
Constructors
-
LabelBelow -
LabelEnd
LinearValidity determines whether the validity of previous steps should be checked or not
pub type LinearValidity {
Check
DontCheck
}
Constructors
-
Check -
DontCheck
Orientation is the orientation of the stepper.
pub type Orientation {
Auto
Horizontal
Vertical
}
Constructors
-
Auto -
Horizontal -
Vertical
Slot gives type-safe names to each of the defined HTML named slots
pub type Slot {
Panel
Step
}
Constructors
-
Panel -
Step
Stepper provides Lustre support for the [M3E Stepper component
Fields:
- header-position: The position of the step header, when oriented horizontally.
- label_position: The position of the step labels, when oriented horizontally.
- linear: Whether the validity of previous steps should be checked or not.
- orientation: The orientation of the stepper.
pub opaque type Stepper
Values
pub fn default_config() -> Config
default_config creates a new Config with default values
pub const default_header_position: HeaderPosition
pub const default_label_position: LabelPosition
pub const default_linear_validity: LinearValidity
pub const default_orientation: Orientation
pub fn header_position(
stepper: Stepper,
header_position: HeaderPosition,
) -> Stepper
header_position sets the header_position field of a Stepper
pub fn label_position(
stepper: Stepper,
label_position: LabelPosition,
) -> Stepper
label_position sets the label_position field of a Stepper
pub fn linear(
stepper: Stepper,
linear: LinearValidity,
) -> Stepper
linear sets the linear field of a Stepper
pub fn orientation(
stepper: Stepper,
orientation: Orientation,
) -> Stepper
orientation sets the orientation field of a Stepper
pub fn render(
stepper: Stepper,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element(msg) from a Stepper
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 slot(s: Slot) -> attribute.Attribute(msg)
slot creates a Lustre ‘slot’ Attribute(msg) for a Slot