x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div class="flow-root" >
<div class="overflow-x-auto">
<div class="inline-block min-w-full align-middle">
<table class="table-auto min-w-full divide-y divide-gray-300">
<thead class="sticky top-0 bg-white">
<tr>
<th class="px-3 py-4 text-left text-sm font-semibold text-gray-900 scope="col" > # </th>
<th class="px-3 py-4 text-left text-sm font-semibold text-gray-900 scope="col" > Name </th>
<th class="px-3 py-4 text-left text-sm font-semibold text-gray-900 scope="col" > Email </th>
</tr>
<tbody class="divide-y divide-gray-200">
<tr class="group" >
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
1
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
Alice
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
alice@example.com
</td>
</tr>
<tr class="group" >
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
2
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
Bob
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
bob@example.com
</td>
</tr>
<tr class="group" >
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
3
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
Charlie
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" >
charlie@example.com
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<%# slim
= render Vitrail::Table.new do |table|
= table.with_header.with_content("id")
= table.with_header.with_content("name")
= table.with_header.with_content("email")
- users.each do |user|
- table.with_row do |row|
= row.with_division.with_content(user.id)
= row.with_division.with_content(user.name)
= row.with_division.with_content(user.email)
%>
<%= render Vitrail::Table.new do |table| %>
<%= table.with_header.with_content("#") %>
<%= table.with_header.with_content("Name") %>
<%= table.with_header.with_content("Email") %>
<% users.each do |user| %>
<% table.with_row do |row| %>
<%= row.with_division.with_content(user.id) %>
<%= row.with_division.with_content(user.name) %>
<%= row.with_division.with_content(user.email) %>
<% end %>
<% end %>
<% end %>