x
<div class="Polaris-Card">
<div class="Polaris-DataTable">
<div class="Polaris-DataTable__ScrollContainer">
<table class="Polaris-DataTable__Table">
<thead>
<tr>
<th scope="col" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--firstColumn Polaris-DataTable__Cell--header">
Product
</th>
<th scope="col" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--header">
Price
</th>
<th scope="col" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--header">
SKU Number
</th>
<th scope="col" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--header Polaris-DataTable__Cell--sortable">
<a class="Polaris-DataTable__Heading" href="#">
<span class="Polaris-DataTable__Icon">
<span class="Polaris-Icon">
<svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M13.098 8H6.902c-.751 0-1.172.754-.708 1.268L9.292 12.7c.36.399 1.055.399 1.416 0l3.098-3.433C14.27 8.754 13.849 8 13.098 8z"></path></svg>
</span>
</span>
Net quantity
</a></th>
<th scope="col" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--header Polaris-DataTable__Cell--sortable Polaris-DataTable__Cell--sorted">
<a class="Polaris-DataTable__Heading" href="#">
<span class="Polaris-DataTable__Icon">
<span class="Polaris-Icon">
<svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M6.902 12h6.196c.751 0 1.172-.754.708-1.268L10.708 7.3c-.36-.399-1.055-.399-1.416 0l-3.098 3.433C5.73 11.246 6.151 12 6.902 12z"></path></svg>
</span>
</span>
Net sales
</a></th>
</tr>
<tr>
<th scope="row" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--firstColumn Polaris-DataTable__Cell--total">
Totals
</th>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--total">
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--total">
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--total">
255
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric Polaris-DataTable__Cell--total">
$155,830.00
</td>
</tr>
</thead>
<tbody>
<tr class="Polaris-DataTable__TableRow Polaris-DataTable--hoverable">
<th scope="row" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--firstColumn">
Emerald Silk Gown
</th>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
$875.00
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
124689
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
140
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
$122,500.00
</td>
</tr>
<tr class="Polaris-DataTable__TableRow Polaris-DataTable--hoverable">
<th scope="row" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--firstColumn">
Mauve Cashmere Scarf
</th>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
$230.00
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
124533
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
83
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
$19,090.00
</td>
</tr>
<tr class="Polaris-DataTable__TableRow Polaris-DataTable--hoverable">
<th scope="row" class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--firstColumn">
Navy Merino Wool Blazer with khaki chinos and yellow belt
</th>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
$445.00
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
124518
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
32
</td>
<td class="Polaris-DataTable__Cell Polaris-DataTable__Cell--verticalAlignTop Polaris-DataTable__Cell--numeric">
$14,240.00
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<% data = [
{ product: "Emerald Silk Gown", price: "$875.00", sku: 124689, qty: 140, sales: "$122,500.00" },
{ product: "Mauve Cashmere Scarf", price: "$230.00", sku: 124533, qty: 83, sales: "$19,090.00" },
{ product: "Navy Merino Wool Blazer with khaki chinos and yellow belt", price: "$445.00", sku: 124518, qty: 32, sales: "$14,240.00" },
] %>
<%= polaris_card(sectioned: false) do %>
<%= polaris_data_table(data, totals_in_header: true) do |table| %>
<% table.column("Product", total: "Totals") do |row| %>
<%= row[:product] %>
<% end %>
<% table.column("Price", numeric: true) do |row| %>
<%= row[:price] %>
<% end %>
<% table.column("SKU Number", numeric: true) do |row| %>
<%= row[:sku] %>
<% end %>
<% table.column("Net quantity",
numeric: true,
total: 255,
sort_url: "#",
) do |row| %>
<%= row[:qty] %>
<% end %>
<% table.column("Net sales",
numeric: true,
total: "$155,830.00",
sort_url: "#",
sorted: :asc,
) do |row| %>
<%= row[:sales] %>
<% end %>
<% end %>
<% end %>
No notes provided.
No params configured.