2020-02-15 00:51:45 +13:00
|
|
|
<script>
|
2020-11-19 08:18:18 +13:00
|
|
|
import { getContext } from "svelte"
|
|
|
|
|
2021-03-02 04:53:37 +13:00
|
|
|
const { styleable, transition } = getContext("sdk")
|
2020-11-25 00:02:10 +13:00
|
|
|
const component = getContext("component")
|
2020-11-18 01:08:24 +13:00
|
|
|
|
2020-03-05 04:20:53 +13:00
|
|
|
export let type = "div"
|
2020-02-15 00:51:45 +13:00
|
|
|
</script>
|
|
|
|
|
2020-02-26 04:21:23 +13:00
|
|
|
{#if type === 'div'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<div
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</div>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'header'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<header
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</header>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'main'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<main
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</main>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'footer'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<footer
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</footer>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'aside'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<aside
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</aside>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'summary'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<summary
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</summary>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'details'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<details
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</details>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'article'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<article
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</article>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'nav'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<nav
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</nav>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'mark'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<mark
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-18 01:08:24 +13:00
|
|
|
<slot />
|
|
|
|
</mark>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'figure'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<figure
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</figure>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'figcaption'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<figcaption
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</figcaption>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'paragraph'}
|
2021-03-11 06:56:16 +13:00
|
|
|
<p
|
|
|
|
in:transition={{ type: $component.transition }}
|
|
|
|
use:styleable={$component.styles}>
|
2020-11-14 04:42:32 +13:00
|
|
|
<slot />
|
|
|
|
</p>
|
2020-02-15 00:51:45 +13:00
|
|
|
{/if}
|