anki/ts/graphs/TableData.svelte
Henrik Giesel 1d72599a37 Rename anki/ to lib/ for export
import _ from "anki/x";

will become

import _ from "lib/x";

to fit the directory name.
2021-04-23 10:02:28 +10:00

36 lines
769 B
Svelte

<!--
Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type { TableDatum } from "./graph-helpers";
import { i18n } from "lib/i18n";
export let tableData: TableDatum[];
</script>
<style lang="scss">
div {
display: flex;
justify-content: center;
}
.align-end {
text-align: end;
}
.align-start {
text-align: start;
}
</style>
<div>
<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>