m3e/drawer_container

DrawerContainer is a container for one or two sliding drawers.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    end: End,
    end_mode: drawer_mode.DrawerMode,
    end_divider: EndDivider,
    start: Start,
    start_mode: drawer_mode.DrawerMode,
    start_divider: StartDivider,
  )
}

Constructors

DrawerContainer is a View Model for this component

Fields:

  • end: Whether the end drawer is open.
  • end_mode: The behavior mode of the end drawer.
  • end_divider: Whether to show a divider between the end drawer and content for side mode.
  • start: Whether the start drawer is open.
  • start_mode: The behavior mode of the start drawer.
  • start_divider: Whether to show a divider between the start drawer and content for side mode.
pub opaque type DrawerContainer

End is whether the end drawer is open.

pub type End {
  IsEnd
  IsNotEnd
}

Constructors

  • IsEnd
  • IsNotEnd

EndDivider is whether to show a divider between the end drawer and content for side mode.

pub type EndDivider {
  IsEndDivider
  IsNotEndDivider
}

Constructors

  • IsEndDivider
  • IsNotEndDivider

Slots are used in child elements to insert content into this component

pub type Slot {
  Start
  End
}

Constructors

  • Start
  • End

Start is whether the start drawer is open.

pub type Start {
  IsStart
  IsNotStart
}

Constructors

  • IsStart
  • IsNotStart

StartDivider is whether to show a divider between the start drawer and content for side mode.

pub type StartDivider {
  IsStartDivider
  IsNotStartDivider
}

Constructors

  • IsStartDivider
  • IsNotStartDivider

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_end: End
pub const default_end_divider: EndDivider
pub const default_start: Start
pub const default_start_divider: StartDivider
pub fn end(record: DrawerContainer, end: End) -> DrawerContainer

end sets the value of end for this DrawerContainer.

pub fn end_divider(
  record: DrawerContainer,
  end_divider: EndDivider,
) -> DrawerContainer

end_divider sets the value of end_divider for this DrawerContainer.

pub fn end_mode(
  record: DrawerContainer,
  end_mode: drawer_mode.DrawerMode,
) -> DrawerContainer

end_mode sets the value of end_mode for this DrawerContainer.

pub fn from_config(config: Config) -> DrawerContainer

from_config creates a new DrawerContainer from the given configuration.

pub fn new() -> DrawerContainer

new creates a new DrawerContainer with the default configuration.

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

render creates a Lustre Element for a DrawerContainer

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

pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

pub fn start(
  record: DrawerContainer,
  start: Start,
) -> DrawerContainer

start sets the value of start for this DrawerContainer.

pub fn start_divider(
  record: DrawerContainer,
  start_divider: StartDivider,
) -> DrawerContainer

start_divider sets the value of start_divider for this DrawerContainer.

pub fn start_mode(
  record: DrawerContainer,
  start_mode: drawer_mode.DrawerMode,
) -> DrawerContainer

start_mode sets the value of start_mode for this DrawerContainer.

Search Document