25 lines
434 B
Svelte
25 lines
434 B
Svelte
<script>
|
|
/**
|
|
* @typedef {Object} Props
|
|
* @property {string} [name]
|
|
* @property {boolean} [is_vertical]
|
|
* @property {import('svelte').Snippet} [children]
|
|
*/
|
|
|
|
/** @type {Props} */
|
|
let {
|
|
name = $bindable(""),
|
|
is_vertical = false,
|
|
children
|
|
} = $props();
|
|
</script>
|
|
|
|
<div
|
|
class="w-auto my-1
|
|
{is_vertical ? 'flex-col items-start' : 'items-center'}
|
|
flex justify-start"
|
|
>
|
|
<h1>{name}</h1>
|
|
{@render children?.()}
|
|
</div>
|