2020-08-04 06:37:21 +02:00
|
|
|
<script lang="typescript">
|
2020-11-01 05:26:58 +01:00
|
|
|
import type { TableDatum } from "./graph-helpers";
|
2021-03-26 11:23:43 +01:00
|
|
|
import { i18n } from "anki/i18n";
|
2020-08-04 06:37:21 +02:00
|
|
|
export let tableData: TableDatum[];
|
|
|
|
</script>
|
|
|
|
|
2021-03-21 13:47:52 +01:00
|
|
|
<style lang="scss">
|
|
|
|
div {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.align-end {
|
|
|
|
text-align: end;
|
|
|
|
}
|
|
|
|
|
|
|
|
.align-start {
|
|
|
|
text-align: start;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div>
|
2020-08-04 06:37:21 +02:00
|
|
|
<table dir={i18n.direction()}>
|
|
|
|
{#each tableData as { label, value }}
|
|
|
|
<tr>
|
|
|
|
<td class="align-end">{label}:</td>
|
|
|
|
<td class="align-start">{value}</td>
|
|
|
|
</tr>
|
|
|
|
{/each}
|
|
|
|
</table>
|
|
|
|
</div>
|