m3e/menu_item_checkbox

menu_item_checkbox provides Lustre support for the M3E Menu Item Checkbox component

Types

MenuItemCheckbox is an item of a menu which supports a checkable state

Fields:

  • checked: Whether the element is checked
  • disabled: Whether the element is disabled
pub opaque type MenuItemCheckbox

Slot gives type-safe names to each of the defined HTML named slots

pub type Slot {
  Icon
  TrailingIcon
}

Constructors

  • Icon
  • TrailingIcon

Values

pub fn checked(
  m: MenuItemCheckbox,
  checked: Bool,
) -> MenuItemCheckbox

checked sets the checked field

pub fn disabled(
  m: MenuItemCheckbox,
  disabled: Bool,
) -> MenuItemCheckbox

disabled sets the disabled field

pub fn new() -> MenuItemCheckbox

new creates a new MenuItemCheckbox

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

render creates a Lustre Element from a MenuItemCheckbox

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

slot creates a Lustre ‘slot’ Attribute(msg) for a Slot

Search Document