PhoenixLiveCalendar.Components.TimeGutter (PhoenixLiveCalendar v0.1.0)

Copy Markdown View Source

Renders the time labels column alongside a time grid view.

Summary

Functions

Renders a now indicator line positioned within the time grid.

Renders a vertical time gutter with hour labels.

Functions

now_indicator(assigns)

Renders a now indicator line positioned within the time grid.

Attributes

  • current_time — Current Time value
  • min_time — Earliest visible time
  • max_time — Latest visible time
  • class — Additional CSS classes

Attributes

  • current_time (Time) (required)
  • min_time (Time) - Defaults to ~T[00:00:00].
  • max_time (Time) - Defaults to ~T[23:59:59].
  • class (:string) - Defaults to "".

time_gutter(assigns)

Renders a vertical time gutter with hour labels.

Attributes

  • slots — List of Time values for each slot (from TimeSlots.time_grid_slots/1)
  • slot_height — CSS height for each slot (default: "3rem")
  • time_format:h24 or :h12 (default: :h24)
  • secondary_timezone — Optional secondary timezone label generator function
  • class — Additional CSS classes

Slots

  • time_label — Custom time label rendering. Receives the time as slot argument.

Attributes

  • slots (:list) (required)
  • slot_height (:string) - Defaults to "3rem".
  • time_format (:atom) - Defaults to :h24.
  • secondary_timezone (:any) - Defaults to nil.
  • class (:string) - Defaults to "".

Slots

  • time_label