m3e/radio

radio provides Lustre support for the M3E Radio component

Types

Config holds the configuration for a Radio

pub type Config {
  Config(
    checked: state.CheckedState,
    interaction: state.Interaction,
    form_submission: option.Option(form_submission.FormSubmission),
    requirement: state.Requirement,
  )
}

Constructors

Radio provides Lustre support for the M3E Radio component

Fields:

  • checked: Whether the element is checked
  • interaction: Whether the element is enabled or disabled
  • form_submission: handles this button’s role in form submission
  • requirement: Whether the element is required
pub opaque type Radio

Values

pub fn checked(r: Radio, state: state.CheckedState) -> Radio

checked sets the checked field

pub fn default_config() -> Config

default_config creates a new Config with default values

pub fn disabled(
  r: Radio,
  interaction: state.Interaction,
) -> Radio

disabled sets the interaction field

pub fn form(
  r: Radio,
  fs: option.Option(form_submission.FormSubmission),
) -> Radio

form_submission sets up a Radio to participate in an HTML form

pub fn from_config(c: Config) -> Radio

from_config creates a Radio from a Config record

pub fn new() -> Radio

new creates a new Radio with default values

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

render creates a Lustre Element(msg) from a Radio

Parameters:

  • r: a Radio
  • 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 required(
  r: Radio,
  requirement: state.Requirement,
) -> Radio

required sets the requirement field

Search Document