m3e/list

list provides Lustre support for the M3E List component

Types

Config is the configuration of a List

pub type Config {
  Config(variant: list_variant.Variant)
}

Constructors

List provides expressive, accessible components for organizing and displaying lists of items

Fields:

  • variant: The appearance variant of the list
pub opaque type M3EList

Values

pub fn default_config() -> Config

default_config creates a Config with default values

pub fn from_config(config: Config) -> M3EList

from_config creates a List from a Config

pub fn new() -> M3EList

new creates a List with default values

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

render creates a Lustre Element from a List

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 variant(
  arg: M3EList,
  variant: list_variant.Variant,
) -> M3EList

variant sets the variant field

Search Document