blob: 2df9f8c9e3ca06e2c7c48ce4a69a3a426b82b4f6 (
plain)
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
|
<script lang="ts">
export let data;
export let nofooter: boolean = false;
export let noheader: boolean = false;
export let title: string;
</script>
<table>
{#if title}
<h2>{title}</h2>
{/if}
{#if !noheader}
<thead>
<tr>
<th>
Data Header
</th>
</tr>
</thead>
{/if}
<tbody>
<tr>
<td>Data</td>
</tr>
</tbody>
{#if !nofooter}
<slot name="footer">
<tfoot>
<tr>
<td>Table Footer</td>
</tr>
</tfoot>
</slot>
{/if}
</table>
<style>
table {
padding: 16px;
margin: 8px;
border: solid 1px black;
}
</style>
|