jankboard/client/src/lib/Apps/AppContainer.svelte

35 lines
716 B
Svelte
Raw Normal View History

2024-02-24 01:38:00 -08:00
<!--
@component
A utility component that wraps your app in a container and adds transitions
@param useContainer - Whether or not to use the default app container. Defaults to true.
-->
<script lang="ts">
2024-02-25 01:21:13 -08:00
import { onDestroy } from "svelte";
import { fade } from "svelte/transition";
import { infotainmentBootupSequence } from "../Sequences/sequences";
2024-02-24 01:38:00 -08:00
2024-02-25 01:21:13 -08:00
export let useContainer: boolean = true;
onDestroy(() => {
2024-02-25 01:21:13 -08:00
infotainmentBootupSequence();
});
2024-02-24 01:38:00 -08:00
</script>
<div
in:fade={{ duration: 150, delay: 150 }}
out:fade={{ duration: 150 }}
2024-02-25 01:29:59 -08:00
class:app-container={useContainer}
2024-02-24 01:38:00 -08:00
{...$$restProps}
>
<slot />
</div>
<style lang="postcss">
.app-container {
@apply pb-20;
}
</style>