x
<div class="Polaris-Card">
<div class="Polaris-IndexTable">
<div class="Polaris-IndexTable-ScrollContainer">
<table class="Polaris-IndexTable__Table">
<thead>
<tr>
<th class="Polaris-IndexTable__TableHeading">
Name
</th>
<th class="Polaris-IndexTable__TableHeading">
Location
</th>
<th class="Polaris-IndexTable__TableHeading">
Order count
</th>
<th class="Polaris-IndexTable__TableHeading">
Amount spent
</th>
</tr>
</thead>
<tbody>
<tr class="Polaris-IndexTable__TableRow Polaris-IndexTable__TableRow--unclickable">
<td class="Polaris-IndexTable__TableCell">
<span class="Polaris-TextStyle--variationStrong">Mae Jemison</span>
</td>
<td class="Polaris-IndexTable__TableCell">
Decatur, USA
</td>
<td class="Polaris-IndexTable__TableCell">
20
</td>
<td class="Polaris-IndexTable__TableCell">
$2,400
</td>
</tr>
<tr class="Polaris-IndexTable__TableRow Polaris-IndexTable__TableRow--unclickable">
<td class="Polaris-IndexTable__TableCell">
<span class="Polaris-TextStyle--variationStrong">Ellen Ochoa</span>
</td>
<td class="Polaris-IndexTable__TableCell">
Los Angeles, USA
</td>
<td class="Polaris-IndexTable__TableCell">
30
</td>
<td class="Polaris-IndexTable__TableCell">
$140
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<% data = [
{ name: "Mae Jemison", location: "Decatur, USA", orders: 20, amount_spent: "$2,400" },
{ name: "Ellen Ochoa", location: "Los Angeles, USA", orders: 30, amount_spent: "$140" },
] %>
<%= polaris_card(sectioned: false) do %>
<%= polaris_index_table(data) do |table| %>
<% table.column("Name") do |row| %>
<%= polaris_text_strong { row[:name] } %>
<% end %>
<% table.column("Location") do |row| %>
<%= row[:location] %>
<% end %>
<% table.column("Order count") do |row| %>
<%= row[:orders] %>
<% end %>
<% table.column("Amount spent") do |row| %>
<%= row[:amount_spent] %>
<% end %>
<% end %>
<% end %>
No notes provided.
No params configured.