Spaces:
Running
Running
File size: 847 Bytes
a18645a |
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 |
<script lang="ts">
import { type NodeProps } from '@xyflow/svelte';
import LynxKiteNode from './LynxKiteNode.svelte';
type $$Props = NodeProps;
export let data: $$Props['data'];
</script>
<LynxKiteNode {...$$props}>
{#if data.view}
{#each Object.entries(data.view.dataframes) as [name, df]}
<div class="df-head">{name}</div>
<table>
<tr>
{#each df.columns as column}
<th>{column}</th>
{/each}
</tr>
{#each df.data as row}
<tr>
{#each row as cell}
<td>{cell}</td>
{/each}
</tr>
{/each}
</table>
{/each}
{/if}
</LynxKiteNode>
<style>
.df-head {
font-weight: bold;
padding: 8px;
background: #f0f0f0;
}
table {
margin: 8px;
border-collapse: collapse;
}
</style>
|