2020-02-15 00:51:45 +13:00
|
|
|
<script>
|
2020-11-19 08:18:18 +13:00
|
|
|
import { getContext } from "svelte"
|
|
|
|
|
2020-11-20 22:50:10 +13:00
|
|
|
const { styleable } = getContext("sdk")
|
2020-11-25 00:02:10 +13:00
|
|
|
const component = getContext("component")
|
2020-11-18 01:08:24 +13:00
|
|
|
|
2020-02-15 00:51:45 +13:00
|
|
|
export let className = ""
|
|
|
|
export let type
|
2020-04-22 22:52:55 +12:00
|
|
|
export let text = ""
|
2020-02-15 00:51:45 +13:00
|
|
|
</script>
|
|
|
|
|
2020-02-26 04:21:23 +13:00
|
|
|
{#if type === 'h1'}
|
2020-11-25 00:02:10 +13:00
|
|
|
<h1 class={className} use:styleable={$component.styles}>{text}</h1>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'h2'}
|
2020-11-25 00:02:10 +13:00
|
|
|
<h2 class={className} use:styleable={$component.styles}>{text}</h2>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'h3'}
|
2020-11-25 00:02:10 +13:00
|
|
|
<h3 class={className} use:styleable={$component.styles}>{text}</h3>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'h4'}
|
2020-11-25 00:02:10 +13:00
|
|
|
<h4 class={className} use:styleable={$component.styles}>{text}</h4>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'h5'}
|
2020-11-25 00:02:10 +13:00
|
|
|
<h5 class={className} use:styleable={$component.styles}>{text}</h5>
|
2020-02-26 04:21:23 +13:00
|
|
|
{:else if type === 'h6'}
|
2020-11-25 00:02:10 +13:00
|
|
|
<h6 class={className} use:styleable={$component.styles}>{text}</h6>
|
2020-02-15 00:51:45 +13:00
|
|
|
{/if}
|