Files
classroomio/src/lib/components/PageBody/index.svelte
T

31 lines
609 B
Svelte
Raw Normal View History

2021-07-01 09:31:26 +03:00
<script>
// import
2021-07-03 19:29:41 +00:00
// border border-gray-300 rounded-md p-3 bg-blue-200 bg-opacity-25
export let width = 'max-w-4xl w-full lg:w-11/12';
2021-09-14 07:01:44 +03:00
export let padding = 'pb-5 px-4';
2021-08-24 10:45:43 +03:00
export let className = '';
2021-07-01 09:31:26 +03:00
</script>
2021-09-14 07:01:44 +03:00
<div class="root mt-4 mx-auto {width} {className} relative {padding}">
2021-07-01 09:31:26 +03:00
{#if $$slots.header}
<div
class="head dark:bg-gray-800 flex items-center justify-between sticky right-0 w-full px-3"
2021-07-01 09:31:26 +03:00
>
<slot name="header" />
</div>
{/if}
<slot />
</div>
<style>
2021-08-18 19:47:02 +03:00
.root {
2021-08-26 13:35:56 +03:00
overflow-y: auto;
height: 90vh;
2021-08-18 19:47:02 +03:00
}
2021-07-01 09:31:26 +03:00
.head {
2021-08-18 19:47:02 +03:00
top: 0px;
2021-07-03 19:29:41 +00:00
z-index: 1;
2021-07-01 09:31:26 +03:00
}
</style>