<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>
