Table

Command Status Ran by Duration Created at
test TuistKitAcceptanceTests
Success
CI
5s
2 hours ago
Attribute Type Documentation Default Value
Required id * :string

A uniqie identifier for the table

Required rows * :list

The table content

row_key :fun

A function to generate the row key. Required when using a LiveView stream. If using streams and not provided, defaults to the id key of the stream.

row_navigate :fun

A function to generate the link to navigate to when clicking on a row.

row_click :fun

A function to generate the click handler for a row.

empty_state :slot
Required col * :slot
Show slot attributes Hide slot attributes
label :string

The label of the column

icon :string

An icon to render next to the label

patch :string

A patch to apply to the column

<:col :let={i} label="Command">
  <.text_cell label={i.command} />
</:col>
<:col :let={i} label="Status">
  <.status_badge_cell label={i.status} status={String.downcase(i.status)} />
</:col>
<:col :let={i} label="Ran by">
  <.badge_cell label={i.ran_by} color="information" style="light-fill" />
</:col>
<:col :let={i} label="Duration" icon="square_rounded_arrow_down">
  <.text_cell label={i.duration} />
</:col>
<:col :let={i} label="Created at">
  <.text_cell sublabel={i.created_at} />
</:col>