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: types.Orientation,
)
}
Constructors
-
Config( elevated: Elevation, shape: Shape, variant: Variant, vertical: types.Orientation, )
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
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 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 vertical(
t: Toolbar,
vertical: types.Orientation,
) -> Toolbar
vertical sets the vertical field