aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/blog/TableWrapper.svelte15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/blog/TableWrapper.svelte b/src/lib/blog/TableWrapper.svelte
new file mode 100644
index 0000000..ddf3d73
--- /dev/null
+++ b/src/lib/blog/TableWrapper.svelte
@@ -0,0 +1,15 @@
+<script lang="ts">
+ import type { Snippet } from 'svelte';
+
+ const {
+ children,
+ maxwidth = false,
+ }: {
+ children: Snippet;
+ maxwidth?: boolean;
+ } = $props();
+</script>
+
+<div class={{ 'formatted-table my-1': true, 'w-max': !maxwidth }}>
+ {@render children()}
+</div>