m3e/button_group

ButtonGroup is organizes buttons and adds interactions between them.

This file was generated by m3e/generator

     DO NOT EDIT

Types

ButtonGroup is a View Model for this component

Fields:

  • multi: Whether multiple toggle buttons can be selected.
  • size: The size of the group.
  • variant: The appearance variant of the group.
pub opaque type ButtonGroup

Config is a public record for configuring this component.

pub type Config {
  Config(
    multi: Multi,
    size: button_group_size.ButtonGroupSize,
    variant: button_group_variant.ButtonGroupVariant,
  )
}

Constructors

Multi is whether multiple toggle buttons can be selected.

pub type Multi {
  IsMulti
  IsNotMulti
}

Constructors

  • IsMulti
  • IsNotMulti

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_multi: Multi
pub fn from_config(config: Config) -> ButtonGroup

from_config creates a new ButtonGroup from the given configuration.

pub fn multi(record: ButtonGroup, multi: Multi) -> ButtonGroup

multi sets the value of multi for this ButtonGroup.

pub fn new() -> ButtonGroup

new creates a new ButtonGroup with the default configuration.

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

render creates a Lustre Element for a ButtonGroup

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 ButtonGroup Config

pub fn size(
  record: ButtonGroup,
  size: button_group_size.ButtonGroupSize,
) -> ButtonGroup

size sets the value of size for this ButtonGroup.

pub fn variant(
  record: ButtonGroup,
  variant: button_group_variant.ButtonGroupVariant,
) -> ButtonGroup

variant sets the value of variant for this ButtonGroup.

Search Document