m3e/toolbar

toolbar provides Lustre support for the M3E Toolbar component

Types

Config holds the configuration for a Toolbar

pub type Config {
  Config(
    elevated: Elevation,
    shape: Shape,
    variant: Variant,
    vertical: layout.Orientation,
  )
}

Constructors

Elevation specifies the elevation of the element

pub type Elevation {
  Raised
  Lowered
}

Constructors

  • Raised
  • Lowered

Shape is the possible shape variants of a toolbar

pub type Shape {
  Rounded
  Square
}

Constructors

  • Rounded
  • Square

Toolbar provides Lustre support for the M3E Toolbar component

Fields:

  • elevated: Whether the toolbar is elevated
  • shape: The shape of the toolbar
  • variant: The appearance variant of the toolbar
  • vertical: Whether the element is oriented vertically
pub opaque type Toolbar

Variant is the possible appearance variants of a toolbar

pub type Variant {
  Standard
  Vibrant
}

Constructors

  • Standard
  • Vibrant

Values

pub fn default_config() -> Config

default_config creates a new Config with default values

pub const default_elevation: Elevation
pub const default_shape: Shape
pub const default_variant: Variant
pub fn elevated(t: Toolbar, elevated: Elevation) -> Toolbar

elevated sets the elevated field

pub fn from_config(config: Config) -> Toolbar

from_config creates a Toolbar from a Config

pub fn new() -> Toolbar

new creates a new Toolbar

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

render creates a Lustre Element(msg) from a Toolbar

Parameters:

  • t: a Toolbar
  • 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 shape(t: Toolbar, shape: Shape) -> Toolbar

shape sets the shape field

pub fn variant(t: Toolbar, variant: Variant) -> Toolbar

variant sets the variant field

pub fn vertical(
  t: Toolbar,
  vertical: layout.Orientation,
) -> Toolbar

vertical sets the vertical field

Search Document