m3e/slide_group

slide_group provides Lustre support for the M3E Slide Group component

Types

Config holds the configuration for a SlideGroup

pub type Config {
  Config(
    interaction: types.Interaction,
    next_page_label: String,
    previous_page_label: String,
    threshold: Int,
    orientation: types.Orientation,
  )
}

Constructors

SlideGroup provides Lustre support for the M3E Slide Group component

Fields:

  • interaction: Whether scroll buttons are enabled or disabled
  • next_page_label: The accessible label given to the button used to move to the previous page
  • previous_page_label: The accessible label given to the button used to move to the next page
  • threshold: A value, in pixels, indicating the scroll threshold at which to begin showing pagination controls
  • orientation: Whether content is oriented vertically or horizontally
pub opaque type SlideGroup

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

pub type Slot {
  NextIcon
  PrevIcon
}

Constructors

  • NextIcon
  • PrevIcon

Values

pub fn default_config() -> Config

default_config creates a new Config with default values

pub const default_next_page_label: String
pub const default_previous_page_label: String
pub fn disabled(
  s: SlideGroup,
  interaction: types.Interaction,
) -> SlideGroup

disabled sets the interaction field

pub fn from_config(c: Config) -> SlideGroup

from_config creates a SlideGroup from a Config record

pub fn new() -> SlideGroup

new creates a new SlideGroup with default values

pub fn next_page_label(
  s: SlideGroup,
  next_page_label: String,
) -> SlideGroup

next_page_label sets the next_page_label field

pub fn previous_page_label(
  s: SlideGroup,
  previous_page_label: String,
) -> SlideGroup

previous_page_label sets the previous_page_label field

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

render creates a Lustre Element(msg) from a SlideGroup

Parameters:

  • s: a SlideGroup
  • 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 slot(s: Slot) -> attribute.Attribute(msg)

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

pub fn threshold(s: SlideGroup, threshold: Int) -> SlideGroup

threshold sets the threshold field

pub fn vertical(
  s: SlideGroup,
  orientation: types.Orientation,
) -> SlideGroup

vertical sets the orientation field

Search Document