m3e/fab

Fab is a floating action button (FAB) used to present important actions.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    disabled: Disabled,
    disabled_interactive: DisabledInteractive,
    download: option.Option(String),
    extended: Extended,
    href: String,
    lowered: Lowered,
    name: String,
    rel: String,
    size: fab_size.FabSize,
    target: option.Option(link_target.LinkTarget),
    type_: form_submitter_type.FormSubmitterType,
    value: String,
    variant: fab_variant.FabVariant,
  )
}

Constructors

Disabled is whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

DisabledInteractive is whether the element is disabled and interactive.

pub type DisabledInteractive {
  IsDisabledInteractive
  IsNotDisabledInteractive
}

Constructors

  • IsDisabledInteractive
  • IsNotDisabledInteractive

Extended is whether the button is extended to show the label.

pub type Extended {
  IsExtended
  IsNotExtended
}

Constructors

  • IsExtended
  • IsNotExtended

Fab is a View Model for this component

Fields:

  • disabled: Whether the element is disabled.
  • disabled_interactive: Whether the element is disabled and interactive.
  • download: A value indicating whether the target of the link button will be downloaded, optionally specifying the new name of the file.
  • extended: Whether the button is extended to show the label.
  • href: The URL to which the link button points.
  • lowered: Whether to present a lowered elevation.
  • name: The name of the element, submitted as a pair with the element’s value as part of form data, when the element is used to submit a form.
  • rel: The relationship between the target of the link button and the document.
  • size: The size of the button.
  • target: The target of the link button.
  • type_: The type of the element.
  • value: The value associated with the element’s name when it’s submitted with form data.
  • variant: The appearance variant of the button.
pub opaque type Fab

Lowered is whether to present a lowered elevation.

pub type Lowered {
  IsLowered
  IsNotLowered
}

Constructors

  • IsLowered
  • IsNotLowered

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

pub type Slot {
  Label
  CloseIcon
}

Constructors

  • Label
  • CloseIcon

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_disabled_interactive: DisabledInteractive
pub const default_download: option.Option(String)
pub const default_extended: Extended
pub const default_href: String
pub const default_lowered: Lowered
pub const default_name: String
pub const default_rel: String
pub const default_size: fab_size.FabSize
pub const default_value: String
pub fn disabled(record: Fab, disabled: Disabled) -> Fab

disabled sets the value of disabled for this Fab.

pub fn disabled_interactive(
  record: Fab,
  disabled_interactive: DisabledInteractive,
) -> Fab

disabled_interactive sets the value of disabled_interactive for this Fab.

pub fn download(
  record: Fab,
  download: option.Option(String),
) -> Fab

download sets the value of download for this Fab.

pub fn extended(record: Fab, extended: Extended) -> Fab

extended sets the value of extended for this Fab.

pub fn from_config(config: Config) -> Fab

from_config creates a new Fab from the given configuration.

pub fn href(record: Fab, href: String) -> Fab

href sets the value of href for this Fab.

pub fn lowered(record: Fab, lowered: Lowered) -> Fab

lowered sets the value of lowered for this Fab.

pub fn name(record: Fab, name: String) -> Fab

name sets the value of name for this Fab.

pub fn new() -> Fab

new creates a new Fab with the default configuration.

pub fn rel(record: Fab, rel: String) -> Fab

rel sets the value of rel for this Fab.

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

render creates a Lustre Element for a Fab

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

pub fn size(record: Fab, size: fab_size.FabSize) -> Fab

size sets the value of size for this Fab.

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

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

pub fn target(
  record: Fab,
  target: option.Option(link_target.LinkTarget),
) -> Fab

target sets the value of target for this Fab.

pub fn type_(
  record: Fab,
  type_: form_submitter_type.FormSubmitterType,
) -> Fab

type_ sets the value of type_ for this Fab.

pub fn value(record: Fab, value: String) -> Fab

value sets the value of value for this Fab.

pub fn variant(
  record: Fab,
  variant: fab_variant.FabVariant,
) -> Fab

variant sets the value of variant for this Fab.

Search Document