# `PhoenixKitProjects.Web.Components.AssignmentStatusBadge`
[🔗](https://github.com/BeamLabEU/phoenix_kit_projects/blob/v0.14.0/lib/phoenix_kit_projects/web/components/assignment_status_badge.ex#L1)

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` — Tailwind `bg-*` class for filled circles/dots.
  * `badge_class/1` — daisyUI `badge-*` 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" />

# `assignment_status_badge`

## Attributes

* `status` (`:string`) (required)
* `size` (`:string`) - Defaults to `"sm"`. Must be one of `"xs"`, `"sm"`, `"md"`, or `"lg"`.
* `class` (`:string`) - Defaults to `nil`.

# `badge_class`

```elixir
@spec badge_class(String.t() | nil) :: String.t()
```

daisyUI badge variant class for an assignment status.

# `color`

```elixir
@spec color(String.t() | nil) :: String.t()
```

Tailwind background-color class for an assignment status.

# `label`

```elixir
@spec label(String.t() | nil) :: String.t()
```

Localized human label for an assignment status.

# `ring`

```elixir
@spec ring(String.t() | nil) :: String.t()
```

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.

# `text_color`

```elixir
@spec text_color(String.t() | nil) :: String.t()
```

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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
