AdminElf.InputHelpers (admin_elf v0.4.3) View Source

Link to this section Summary

Link to this section Types

Specs

boolean_input() :: %{type: :boolean, name: atom(), label: String.t()}

Specs

checkboxes_input() :: %{
  type: :checkboxes,
  name: atom(),
  label: String.t(),
  options: [{value :: String.t(), label :: String.t()}]
}

Specs

date_input() :: %{
  type: :date,
  name: atom(),
  label: String.t(),
  min: Date.t(),
  max: Date.t(),
  value: Date.t()
}

Specs

Specs

number_input() :: %{type: :number, name: atom(), label: String.t()}

Specs

password_input() :: %{type: :password, name: atom(), label: String.t()}

Specs

radio_input() :: %{
  type: :radio,
  name: atom(),
  label: String.t(),
  default_option: String.t(),
  options: [{value :: String.t(), label :: String.t()}]
}

Specs

select_input() :: %{
  type: :select,
  name: atom(),
  label: String.t(),
  options: [{value :: String.t(), label :: String.t()}]
}

Specs

text_input() :: %{type: :text, name: atom(), label: String.t()}

Link to this section Functions

Link to this function

boolean_input(name, opts \\ [])

View Source

Specs

boolean_input(atom(), keyword()) :: boolean_input()
Link to this function

checkboxes_input(name, opts \\ [])

View Source

Specs

checkboxes_input(atom(), keyword()) :: checkboxes_input()
Link to this function

date_input(name, opts \\ [])

View Source

Specs

date_input(atom(), keyword()) :: date_input()
Link to this function

number_input(name, opts \\ [])

View Source

Specs

number_input(atom(), keyword()) :: number_input()
Link to this function

password_input(name, opts \\ [])

View Source

Specs

password_input(atom(), keyword()) :: password_input()
Link to this function

radio_input(name, opts \\ [])

View Source

Specs

radio_input(atom(), keyword()) :: radio_input()
Link to this function

select_input(name, opts \\ [])

View Source

Specs

select_input(atom(), keyword()) :: select_input()
Link to this function

text_input(name, opts \\ [])

View Source

Specs

text_input(atom(), keyword()) :: text_input()