m3e/expansion_panel
ExpansionPanel is an expandable details-summary view.
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,
hide_toggle: HideToggle,
open: Open,
toggle_direction: expansion_toggle_direction.ExpansionToggleDirection,
toggle_position: expansion_toggle_position.ExpansionTogglePosition,
)
}
Constructors
-
Config( disabled: Disabled, hide_toggle: HideToggle, open: Open, toggle_direction: expansion_toggle_direction.ExpansionToggleDirection, toggle_position: expansion_toggle_position.ExpansionTogglePosition, )
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
ExpansionPanel is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- hide_toggle: Whether to hide the expansion toggle.
- open: Whether the panel is expanded.
- toggle_direction: The direction of the expansion toggle.
- toggle_position: The position of the expansion toggle.
pub opaque type ExpansionPanel
HideToggle is whether to hide the expansion toggle.
pub type HideToggle {
IsHideToggle
IsNotHideToggle
}
Constructors
-
IsHideToggle -
IsNotHideToggle
Open is whether the panel is expanded.
pub type Open {
IsOpen
IsNotOpen
}
Constructors
-
IsOpen -
IsNotOpen
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_hide_toggle: HideToggle
pub const default_open: Open
pub const default_toggle_direction: expansion_toggle_direction.ExpansionToggleDirection
pub const default_toggle_position: expansion_toggle_position.ExpansionTogglePosition
pub fn disabled(
record: ExpansionPanel,
disabled: Disabled,
) -> ExpansionPanel
disabled sets the value of disabled for this ExpansionPanel.
pub fn from_config(config: Config) -> ExpansionPanel
from_config creates a new ExpansionPanel from the given configuration.
pub fn hide_toggle(
record: ExpansionPanel,
hide_toggle: HideToggle,
) -> ExpansionPanel
hide_toggle sets the value of hide_toggle for this ExpansionPanel.
pub fn new() -> ExpansionPanel
new creates a new ExpansionPanel with the default configuration.
pub fn open(record: ExpansionPanel, open: Open) -> ExpansionPanel
open sets the value of open for this ExpansionPanel.
pub fn render(
model: ExpansionPanel,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a ExpansionPanel
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 ExpansionPanel Config
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name
pub fn toggle_direction(
record: ExpansionPanel,
toggle_direction: expansion_toggle_direction.ExpansionToggleDirection,
) -> ExpansionPanel
toggle_direction sets the value of toggle_direction for this ExpansionPanel.
pub fn toggle_position(
record: ExpansionPanel,
toggle_position: expansion_toggle_position.ExpansionTogglePosition,
) -> ExpansionPanel
toggle_position sets the value of toggle_position for this ExpansionPanel.