PhoenixKitProjects. Web. Components. AssignmentStatusBadge
(PhoenixKitProjects v0.12.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.
Outline for a filled dot. The light todo dot (bg-base-300) is nearly
invisible on a white page, so it needs a border to define the circle; the
solid colored states stand on their own.
Foreground (text) class that pairs with color/1 on a filled dot. The todo
dot is light (bg-base-300), so its number needs dark text — plain text-white
was invisible. Colored states use their daisyUI *-content foreground.
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.
Outline for a filled dot. The light todo dot (bg-base-300) is nearly
invisible on a white page, so it needs a border to define the circle; the
solid colored states stand on their own.
Foreground (text) class that pairs with color/1 on a filled dot. The todo
dot is light (bg-base-300), so its number needs dark text — plain text-white
was invisible. Colored states use their daisyUI *-content foreground.