webman/src/lib/ui/Panel.svelte

34 lines
542 B
Svelte

<script lang="ts">
export let title: string | undefined = undefined;
export let fill: boolean = false;
</script>
<section class="panel" class:fill>
{#if title}
<header>
{title}
</header>
{/if}
<slot />
</section>
<style scoped>
.panel {
background-color: var(--neutral-raised);
border-radius: 5px;
padding: var(--padding-normal);
& > header {
margin-bottom: var(--padding-normal);
font-weight: normal;
font-size: 1.2rem;
}
}
.fill {
height: 100%;
display: flex;
flex-direction: column;
}
</style>