m3e/list_action

list_action provides Lustre support for the M3E List Action component

Types

Config is the configuration of a ListAction

pub type Config {
  Config(disabled: Bool, link: link.Link)
}

Constructors

ListAction represents an interactive list item that performs a user-initiated action

Fields:

  • disabled: Whether the element is disabled
  • link: attributes of the link button
pub opaque type ListAction

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

pub type Slot {
  Leading
  Overline
  SupportingText
  Trailing
}

Constructors

  • Leading
  • Overline
  • SupportingText
  • Trailing

Values

pub fn default_config() -> Config

default_config creates a Config with default values

pub fn disabled(la: ListAction, disabled: Bool) -> ListAction

disabled sets the disabled field

pub fn from_config(config: Config) -> ListAction

from_config creates a ListAction from a Config

pub fn link(la: ListAction, link: link.Link) -> ListAction

link sets the link field

pub fn new() -> ListAction

new creates a ListAction with default values

pub fn render(
  la: ListAction,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element from a ListAction

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

Parameters:

  • config: a Config
  • attributes: a list of additional Attributes
  • children: the main content
pub fn slot(s: Slot) -> attribute.Attribute(msg)

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

Search Document