PhoenixKitProjects. Web. Components. AssignmentStatusBadge
(PhoenixKitProjects v0.5.0)
Copy Markdown
View Source
Status presentation for an Assignment.status value ("todo",
"in_progress", "done"). Mirrors DerivedStatusBadge but for the
assignment lifecycle instead of the project lifecycle.
Helpers
All three helpers accept an arbitrary string and fall back to the
"todo" styling on unknown values so a half-broken DB row still
renders sensibly.
color/1— Tailwindbg-*class for filled circles/dots.badge_class/1— daisyUIbadge-*variant class.label/1— gettext'd human label (falls back to the raw value).
Component
<.assignment_status_badge status={assignment.status} />
<.assignment_status_badge status={assignment.status} size="sm" />
Summary
Functions
daisyUI badge variant class for an assignment status.
Tailwind background-color class for an assignment status.
Localized human label for an assignment status.
Functions
Attributes
status(:string) (required)size(:string) - Defaults to"sm". Must be one of"xs","sm","md", or"lg".class(:string) - Defaults tonil.
daisyUI badge variant class for an assignment status.
Tailwind background-color class for an assignment status.
Localized human label for an assignment status.