LineaUI.Components.Overlay (linea_ui v0.1.1)

Copy Markdown View Source

What the overlays share: the on_open / on_close callbacks, which take an event name or a %JS{}, and the close glyph.

Summary

Functions

The %JS{} an overlay runs when it opens or closes. An event name becomes JS.push/2 with %{"id" => id} as its value, sent to target when one is given.

The chevron LineOne's dropdown buttons draw, turning over while the menu is open.

LineOne's close icon (an ×), sized by class.

Functions

callback(js, id, target)

@spec callback(nil | String.t() | Phoenix.LiveView.JS.t(), String.t(), term()) ::
  Phoenix.LiveView.JS.t()

The %JS{} an overlay runs when it opens or closes. An event name becomes JS.push/2 with %{"id" => id} as its value, sent to target when one is given.

chevron_icon(assigns)

The chevron LineOne's dropdown buttons draw, turning over while the menu is open.

Attributes

  • class (:any) - Defaults to nil.

close_icon(assigns)

LineOne's close icon (an ×), sized by class.

Attributes

  • class (:any) - Defaults to "size-4.5".