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
-
Config( disabled: types.Interaction, for: String, selected: Selected, )
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
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 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 slot(s: Slot) -> attribute.Attribute(msg)
slot creates a Lustre ‘slot’ Attribute(msg) for a Slot