m3e/theme_icon

ThemeIcon is an icon that visually presents a preview of a theme.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    color: String,
    scheme: color_scheme.ColorScheme,
    variant: theme_variant.ThemeVariant,
  )
}

Constructors

ThemeIcon is a View Model for this component

Fields:

  • color: The hex color of the theme to preview
  • scheme: The color scheme of the theme.
  • variant: The color variant of the theme.
pub opaque type ThemeIcon

Values

pub fn color(record: ThemeIcon, color: String) -> ThemeIcon

color sets the value of color for this ThemeIcon.

pub const default_color: String
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub fn from_config(config: Config) -> ThemeIcon

from_config creates a new ThemeIcon from the given configuration.

pub fn new() -> ThemeIcon

new creates a new ThemeIcon with the default configuration.

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

render creates a Lustre Element for a ThemeIcon

pub fn render_config(
  c: Config,
  attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element from a ThemeIcon Config

pub fn scheme(
  record: ThemeIcon,
  scheme: color_scheme.ColorScheme,
) -> ThemeIcon

scheme sets the value of scheme for this ThemeIcon.

pub fn variant(
  record: ThemeIcon,
  variant: theme_variant.ThemeVariant,
) -> ThemeIcon

variant sets the value of variant for this ThemeIcon.

Search Document