m3e/tab

tab provides Lustre support for the M3E Tab component

Types

Config holds the configuration for a Tab

pub type Config {
  Config(
    disabled: types.Interaction,
    for: String,
    selected: Selected,
  )
}

Constructors

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 {
  Icon
}

Constructors

  • Icon

Tab provides one view within a structured navigation surface

Fields:

  • disabled: Whether the element is disabled
  • for: The identifier of the interactive control to which this element is attached.
  • selected: Whether the element is selected
pub opaque type Tab

Values

pub fn default_config() -> Config

default_config creates a new Config with default values

pub const default_interaction: types.Interaction
pub const default_selected: Selected
pub fn disabled(t: Tab, disabled: types.Interaction) -> Tab

disabled sets the disabled field

pub fn for(t: Tab, for: String) -> Tab

for sets the for field

pub fn from_config(config: Config) -> Tab

from_config creates a Tab from a Config

pub fn new() -> Tab

new creates a new Tab

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

render creates a Lustre Element(msg) from a Tab

Parameters:

  • t: a Tab
  • attributes: additional attributes
  • children: additional children
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 selected(t: Tab, selected: Selected) -> Tab

selected sets the selected field

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

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

Search Document