MishkaGervaz.Table.Types.Column.Badge (MishkaGervaz v0.0.1-alpha.2)

Copy Markdown View Source

Badge/Status column type.

Renders values as colored badges.

Options (via column.ui.extra)

  • :colors - Map of value to color class Example: %{draft: "bg-gray-100 text-gray-800", published: "bg-green-100 text-green-800"}
  • :default_color - Default color if value not in map (default: "bg-gray-100 text-gray-800")
  • :labels - Map of value to display label (default: humanizes the value)

See MishkaGervaz.Table.Types.Column (registry), MishkaGervaz.Table.Behaviours.ColumnType, and MishkaGervaz.Table.Entities.Column.