plushie/widget/pick_list
Pick list widget builder (dropdown picker).
Types
Option type for pick list properties.
pub type Opt {
Placeholder(String)
Width(length.Length)
Padding(padding.Padding)
TextSize(Float)
Font(font.Font)
LineHeight(line_height.LineHeight)
MenuHeight(Float)
Shaping(shaping.Shaping)
Handle(node.PropValue)
Ellipsis(String)
MenuStyle(node.PropValue)
OnOpen(Bool)
OnClose(Bool)
Style(String)
Required(Bool)
Validation(validation_state.ValidationState)
A11y(a11y.A11y)
}
Constructors
-
Placeholder(String) -
Width(length.Length) -
Padding(padding.Padding) -
TextSize(Float) -
Font(font.Font) -
LineHeight(line_height.LineHeight) -
MenuHeight(Float) -
Shaping(shaping.Shaping) -
Handle(node.PropValue) -
Ellipsis(String) -
MenuStyle(node.PropValue) -
OnOpen(Bool) -
OnClose(Bool) -
Style(String) -
Required(Bool) -
Validation(validation_state.ValidationState) -
A11y(a11y.A11y)
Values
pub fn handle(pl: PickList, h: node.PropValue) -> PickList
Set the dropdown handle style. Pass a DictVal with a “type” key.
pub fn line_height(
pl: PickList,
lh: line_height.LineHeight,
) -> PickList
Set the line height.
pub fn menu_style(pl: PickList, ms: node.PropValue) -> PickList
Set dropdown menu style overrides. Pass a DictVal.
pub fn new(
id: String,
options: List(String),
selected: option.Option(String),
) -> PickList
Create a new pick list builder.
pub fn required(pl: PickList, r: Bool) -> PickList
Mark this field as required. Flows into a11y.required.
pub fn shaping(pl: PickList, s: shaping.Shaping) -> PickList
Set the text shaping strategy.
pub fn validation(
pl: PickList,
v: validation_state.ValidationState,
) -> PickList
Set the form-validation state.