grom/component/radio_group

Types

pub type Option {
  Option(
    value: String,
    label: String,
    description: option.Option(String),
    is_default_selected: Bool,
  )
}

Constructors

  • Option(
      value: String,
      label: String,
      description: option.Option(String),
      is_default_selected: Bool,
    )

    Arguments

    value

    Dev facing value, max 100 characters

    label

    User facing text, max 100 characters

    description

    Max 100 characters

pub type RadioGroup {
  RadioGroup(
    id: option.Option(Int),
    custom_id: String,
    options: List(Option),
    is_required: Bool,
  )
}

Constructors

  • RadioGroup(
      id: option.Option(Int),
      custom_id: String,
      options: List(Option),
      is_required: Bool,
    )

    Arguments

    is_required

    Defaults to True.

Values

pub fn new(
  custom_id custom_id: String,
  options options: List(Option),
) -> RadioGroup
pub fn new_option(
  named label: String,
  value value: String,
) -> Option
Search Document