PhoenixKitProjects.Web.Components.TierPill (PhoenixKitProjects v0.4.0)

Copy Markdown View Source

Status pill rendered next to a project title on the Running dashboard. Encodes the prioritized-tier classification:

  • :late — past planned_end, not done (red, exclamation)
  • :near_done — progress ≥ 75% (green, flag)
  • :on_track — has tasks, not late, not near-done (info, check)
  • :empty — no tasks yet (ghost, inbox)

Use the tier: attr directly when the caller already knows the tier; for callers driving the pill off a summary map use the paired tier_for_summary/1 helper from OverviewLive.

Example

<.tier_pill tier={:late} />

Summary

Functions

Returns the daisyUI class, heroicon name, and gettext'd label for a tier.

Types

tier()

@type tier() :: :late | :near_done | :on_track | :empty

Functions

pill_attrs(arg)

@spec pill_attrs(tier()) :: {String.t(), String.t(), String.t()}

Returns the daisyUI class, heroicon name, and gettext'd label for a tier.

tier_pill(assigns)

Attributes

  • tier (:atom) (required) - Must be one of :late, :near_done, :on_track, or :empty.