Skip to content

Commit 31124ff

Browse files
committed
feat: add table and table row components for data display
1 parent 9ec7421 commit 31124ff

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Table Row Component -->
2+
<tr class="hover:bg-slate-50 transition-colors">
3+
<td class="px-6 py-4 flex items-center gap-3">
4+
<div class="p-1.5 bg-<%= iconBg %> text-<%= iconColor %> rounded">
5+
<%- icon %>
6+
</div>
7+
<span class="font-semibold text-slate-900"><%= name %></span>
8+
</td>
9+
<td class="px-6 py-4 text-slate-500 font-medium"><%= totalFiles %></td>
10+
<td class="px-6 py-4 text-slate-500 font-medium"><%= storageUsed %></td>
11+
<td class="px-6 py-4 text-slate-500 font-medium"><%= averageSize %></td>
12+
<td class="px-6 py-4 text-slate-500 font-medium"><%= shareOfTotal %></td>
13+
</tr>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Table Component -->
2+
<div class="bg-white rounded-2xl overflow-hidden border border-black/5">
3+
<table class="w-full text-left text-sm">
4+
<thead class="bg-slate-50 text-slate-400 font-bold text-[11px] uppercase tracking-wider">
5+
<tr>
6+
<% headers.forEach(header => { %>
7+
<th class="px-6 py-4"><%= header %></th>
8+
<% }); %>
9+
</tr>
10+
</thead>
11+
<tbody class="divide-y divide-slate-100">
12+
<% rows.forEach(row => { %>
13+
<%- include('./table-row', { icon: row.icon, iconBg: row.iconBg, iconColor: row.iconColor, name: row.name, totalFiles: row.totalFiles, storageUsed: row.storageUsed, averageSize: row.averageSize, shareOfTotal: row.shareOfTotal }) %>
14+
<% }); %>
15+
</tbody>
16+
</table>
17+
</div>

0 commit comments

Comments
 (0)