Files
fnx_web/svelte/src/layout/TextBlock.svelte
2025-10-13 16:05:50 +02:00

33 lines
512 B
Svelte

<script lang="ts">
let {
width = "750px",
center = false,
children
}: {
width?: string;
center?: boolean;
children?: import('svelte').Snippet;
} = $props();
</script>
<div class="block" class:center style="width: {width};">
{@render children?.()}
</div>
<style>
.block {
display: block;
text-align: initial;
max-width: 100%;
overflow-wrap: anywhere;
margin: auto;
background-color: var(--shaded_background);
backdrop-filter: blur(4px);
padding: 8px;
}
.center {
text-align: center;
}
</style>