m3e/heading

Heading is a heading to a page or section.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    emphasized: Emphasized,
    level: option.Option(heading_level.HeadingLevel),
    size: heading_size.HeadingSize,
    variant: heading_variant.HeadingVariant,
  )
}

Constructors

Emphasized is whether the heading uses an emphasized typescale.

pub type Emphasized {
  IsEmphasized
  IsNotEmphasized
}

Constructors

  • IsEmphasized
  • IsNotEmphasized

Heading is a View Model for this component

Fields:

  • emphasized: Whether the heading uses an emphasized typescale.
  • level: The accessibility level of the heading.
  • size: The size of the heading.
  • variant: The appearance variant of the heading.
pub opaque type Heading

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_emphasized: Emphasized
pub fn emphasized(
  record: Heading,
  emphasized: Emphasized,
) -> Heading

emphasized sets the value of emphasized for this Heading.

pub fn from_config(config: Config) -> Heading

from_config creates a new Heading from the given configuration.

pub fn level(
  record: Heading,
  level: option.Option(heading_level.HeadingLevel),
) -> Heading

level sets the value of level for this Heading.

pub fn new() -> Heading

new creates a new Heading with the default configuration.

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

render creates a Lustre Element for a Heading

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

pub fn size(
  record: Heading,
  size: heading_size.HeadingSize,
) -> Heading

size sets the value of size for this Heading.

pub fn variant(
  record: Heading,
  variant: heading_variant.HeadingVariant,
) -> Heading

variant sets the value of variant for this Heading.

Search Document