grom/component/checkbox_group
Types
pub type CheckboxGroup {
CheckboxGroup(
id: option.Option(Int),
custom_id: String,
options: List(Option),
min_values: option.Option(Int),
max_values: option.Option(Int),
is_required: Bool,
)
}
Constructors
-
CheckboxGroup( id: option.Option(Int), custom_id: String, options: List(Option), min_values: option.Option(Int), max_values: option.Option(Int), is_required: Bool, )Arguments
- custom_id
-
1-100 characters.
- options
-
Minimum 1, maximum 10.
- min_values
-
Defaults to 1. If set to 0,
is_requiredmust be set to False. - max_values
-
Defaults to the count of options.
- is_required
-
Defaults to True.
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
Values
pub fn new(
custom_id custom_id: String,
options options: List(Option),
) -> CheckboxGroup
pub fn new_option(
named label: String,
value value: String,
) -> Option