File
Blob: ui/operator/Table.svelte
| 1 | <script lang="ts"> |
| 2 | import type { Snippet } from 'svelte'; |
| 3 | import ScrollRegion from '../shared/ScrollRegion.svelte'; |
| 4 | |
| 5 | let { |
| 6 | label, |
| 7 | tableClass = 'min-w-[42rem]', |
| 8 | children, |
| 9 | }: { |
| 10 | label: string; |
| 11 | tableClass?: string; |
| 12 | children: Snippet; |
| 13 | } = $props(); |
| 14 | </script> |
| 15 | |
| 16 | <ScrollRegion {label}> |
| 17 | <table |
| 18 | class="w-full border-collapse text-left [&_th]:px-3 [&_td]:px-3 [&_th]:py-2.5 [&_td]:py-2.5 [&_th]:align-top [&_td]:align-top [&_th]:wrap-anywhere [&_td]:wrap-anywhere [&_th]:border-b [&_td]:border-b [&_th]:border-line [&_td]:border-line [&_thead]:bg-chrome [&_thead_th]:text-xs [&_thead_th]:font-semibold [&_thead_th]:text-muted [&_thead_th]:whitespace-nowrap [&_tbody_th]:font-normal [&_tbody_tr:last-child>*]:border-b-0 [&_tbody_tr:hover]:bg-surface [&_td]:tabular-nums {tableClass}" |
| 19 | > |
| 20 | {@render children()} |
| 21 | </table> |
| 22 | </ScrollRegion> |