PhoenixLiveCalendar.Components.EventItem (PhoenixLiveCalendar v0.1.0)

Copy Markdown View Source

Renders a single event within a calendar cell or time grid.

Supports status-based styling (confirmed, tentative, cancelled, pending approval), urgency indicators (attention, warning, critical with animated borders), priority visual weight, and custom rendering via slots.

Summary

Functions

Renders an event element with status-aware styling.

Functions

event_item(assigns)

Renders an event element with status-aware styling.

Attributes

  • event — A PhoenixLiveCalendar.Event struct
  • on_click — Event handler when the event is clicked
  • compact — Render in compact mode (title only, no time)
  • class — Additional CSS classes
  • time_format:h24 or :h12 (default: :h24)

Status styling

  • :confirmed — solid background (default)
  • :tentative — dashed border, reduced opacity
  • :cancelled — strikethrough text, ghost styling
  • :pending_approval — pulsing border animation
  • :no_show — red-tinted, strikethrough

Urgency indicators

  • :none — no special indicator (default)
  • :attention — subtle pulsing border
  • :warning — yellow/amber animated border
  • :critical — red animated border, more prominent

Slots

  • inner_block — Custom event rendering. Receives the event as a slot argument.

Attributes

  • event (PhoenixLiveCalendar.Event) (required)
  • on_click (:any) - Defaults to nil.
  • compact (:boolean) - Defaults to false.
  • class (:string) - Defaults to "".
  • time_format (:atom) - Defaults to :h24.

Slots

  • inner_block