2020-02-14 12:51:45 +01:00
|
|
|
<script>
|
2020-02-25 16:21:23 +01:00
|
|
|
export let className = ""
|
2020-03-04 16:20:53 +01:00
|
|
|
export let type = "div"
|
2020-02-21 12:43:21 +01:00
|
|
|
|
2020-11-13 16:42:32 +01:00
|
|
|
$: console.log(type)
|
2020-02-14 12:51:45 +01:00
|
|
|
</script>
|
|
|
|
|
2020-02-25 16:21:23 +01:00
|
|
|
{#if type === 'div'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<div>
|
|
|
|
<slot />
|
|
|
|
</div>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'header'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<header>
|
|
|
|
<slot />
|
|
|
|
</header>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'main'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<main>
|
|
|
|
<slot />
|
|
|
|
</main>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'footer'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<footer>
|
|
|
|
<slot />
|
|
|
|
</footer>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'aside'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<aside>
|
|
|
|
<slot />
|
|
|
|
</aside>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'summary'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<summary>
|
|
|
|
<slot />
|
|
|
|
</summary>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'details'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<details>
|
|
|
|
<slot />
|
|
|
|
</details>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'article'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<article>
|
|
|
|
<slot />
|
|
|
|
</article>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'nav'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<nav>
|
|
|
|
<slot />
|
|
|
|
</nav>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'mark'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<mark><slot /></mark>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'figure'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<figure>
|
|
|
|
<slot />
|
|
|
|
</figure>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'figcaption'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<figcaption>
|
|
|
|
<slot />
|
|
|
|
</figcaption>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'paragraph'}
|
2020-11-13 16:42:32 +01:00
|
|
|
<p>
|
|
|
|
<slot />
|
|
|
|
</p>
|
2020-02-14 12:51:45 +01:00
|
|
|
{/if}
|