blask/unstyled/select

Types

pub type SelectState(option_type) {
  SelectState(
    open: Bool,
    current_option: option_type,
    options: List(option_type),
  )
}

Constructors

  • SelectState(
      open: Bool,
      current_option: option_type,
      options: List(option_type),
    )

Functions

pub fn init_state(default: a, options: List(a)) -> SelectState(a)
pub fn select(
  state state: SelectState(a),
  on_state_change state_change: fn(SelectState(a)) -> b,
  main_button main_button: fn(a) -> Element(b),
  list_button list_button: fn(a) -> Element(b),
  list list_element: fn(List(Element(b))) -> Element(b),
) -> Element(b)
Search Document