2020-02-14 12:51:45 +01:00
|
|
|
<script>
|
2020-11-17 13:08:24 +01:00
|
|
|
import { styleable } from "@budibase/component-sdk"
|
|
|
|
|
2020-02-25 16:21:23 +01:00
|
|
|
export let className = ""
|
2020-03-04 16:20:53 +01:00
|
|
|
export let type = "div"
|
2020-11-17 13:08:24 +01:00
|
|
|
export let styles
|
2020-02-14 12:51:45 +01:00
|
|
|
</script>
|
|
|
|
|
2020-02-25 16:21:23 +01:00
|
|
|
{#if type === 'div'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<div use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</div>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'header'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<header use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</header>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'main'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<main use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</main>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'footer'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<footer use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</footer>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'aside'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<aside use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</aside>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'summary'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<summary use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</summary>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'details'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<details use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</details>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'article'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<article use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</article>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'nav'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<nav use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</nav>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'mark'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<mark use:styleable={styles}>
|
|
|
|
<slot />
|
|
|
|
</mark>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'figure'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<figure use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</figure>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'figcaption'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<figcaption use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</figcaption>
|
2020-02-25 16:21:23 +01:00
|
|
|
{:else if type === 'paragraph'}
|
2020-11-17 13:08:24 +01:00
|
|
|
<p use:styleable={styles}>
|
2020-11-13 16:42:32 +01:00
|
|
|
<slot />
|
|
|
|
</p>
|
2020-02-14 12:51:45 +01:00
|
|
|
{/if}
|