View Source ReflectOS.ConsoleWeb.PageComponents (reflect_os_console v0.10.3)

Provides core page components.

Summary

Functions

Renders a header with title.

Renders a list of items

Attributes

  • icon (:string) - The raw SVG string to be used as an icon.
  • title_click (:any) - the function for handling phx-click on the title of the item. Defaults to nil.
  • title_icon (:string) - the hericon to append to the title. Defaults to nil.
  • id (:any) - The unique id for this item.
  • title (:string)
  • subtitle (:string)
  • actions (:list) - List of actions to show in the dropdown menu. Defaults to [].

Functions

Renders a header with title.

Attributes

  • class (:string) - Defaults to nil.

Slots

  • inner_block (required)
  • actions
  • subtitle

Renders a list of items

Attributes

  • id (:any)
  • items (:list) (required)
  • item_id (:any) - the function for generating the item id. Defaults to nil.
  • item_click (:any) - the function for handling phx-click on each item. Defaults to nil.
  • item_map (:any) - the function for mapping each item before. Defaults to &Function.identity/1.

Slots

  • item (required) - Slot for rendering the content of a list item.

Attributes

  • icon (:string) - The raw SVG string to be used as an icon.
  • title_click (:any) - the function for handling phx-click on the title of the item. Defaults to nil.
  • title_icon (:string) - the hericon to append to the title. Defaults to nil.
  • id (:any) - The unique id for this item.
  • title (:string)
  • subtitle (:string)
  • actions (:list) - List of actions to show in the dropdown menu. Defaults to [].
Link to this function

toggle_dropdown(js \\ %JS{}, selector)

View Source