Table
Themed table with
columns
and
rows
slots — each row composes
cells
.
Usage
= app_theme_table do |table|
- table.with_column "Name"
- table.with_column "Role"
- table.with_column "Status"
- table.with_column ""
- [["Ada Lovelace", "Engineer", :success, "Active"], ["Grace Hopper", "Admiral", :warning, "Away"]].each do |name, role, intent, status|
- table.with_row do |row|
- row.with_cell { name }
- row.with_cell { role }
- row.with_cell { app_theme_badge(status, variant: intent) }
- row.with_cell { app_theme_link "Edit", href: "#" }