m3e/button_group
button group provides Lustre support for the M3E Button Group component
Types
Button Group component arranges multiple into a unified, expressive layout
pub opaque type ButtonGroup
Config allows for a declarative configuration of the ButtonGroup
pub type Config {
Config(
multi: types.SelectionMode,
size: option.Option(size_many.Size),
variant: option.Option(Variant),
)
}
Constructors
-
Config( multi: types.SelectionMode, size: option.Option(size_many.Size), variant: option.Option(Variant), )
Values
pub const default_variant: Variant
pub fn from_config(c: Config) -> ButtonGroup
from_config creates a ButtonGroup from a Config
pub fn multi(
bg: ButtonGroup,
multi: types.SelectionMode,
) -> ButtonGroup
multi sets the multi field
pub fn render(
bg: ButtonGroup,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element from a Button Group
Parameters:
- bg: a ButtonGroup
- attributes: a list of additional Attributes
- children: a list of child Elements
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 Config
pub fn size(
bg: ButtonGroup,
size: option.Option(size_many.Size),
) -> ButtonGroup
size sets the size field
pub fn variant(
bg: ButtonGroup,
variant: option.Option(Variant),
) -> ButtonGroup
variant sets the variant field