feat: 创建现代表格组件 ModernTable
This commit is contained in:
parent
9cb9a0b05c
commit
959a272c25
15
src/components/ModernTable.astro
Normal file
15
src/components/ModernTable.astro
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
// 这是一个通用的现代表格容器组件
|
||||
---
|
||||
<div class="not-prose my-8 overflow-hidden rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-[#0f111a] shadow-sm">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left text-sm text-gray-600 dark:text-gray-300">
|
||||
<thead class="border-b border-gray-200 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50 text-xs uppercase text-gray-500 dark:text-gray-400">
|
||||
<slot name="header" />
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 dark:divide-gray-800">
|
||||
<slot name="body" />
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user