1
0
Fork 0
mirror of synced 2024-09-16 09:17:40 +12:00
budibase/packages/standard-components/src/Heading.svelte
2020-05-19 17:00:53 +01:00

26 lines
791 B
Svelte

<script>
import { buildStyle } from "./buildStyle.js"
export let className = ""
export let type
export let text = ""
export let _bb
let containerElement
$: containerElement && !text && _bb.attachChildren(containerElement)
</script>
{#if type === 'h1'}
<h1 class={className} bind:this={containerElement}>{text}</h1>
{:else if type === 'h2'}
<h2 class={className} bind:this={containerElement}>{text}</h2>
{:else if type === 'h3'}
<h3 class={className} bind:this={containerElement}>{text}</h3>
{:else if type === 'h4'}
<h4 class={className} bind:this={containerElement}>{text}</h4>
{:else if type === 'h5'}
<h5 class={className} bind:this={containerElement}>{text}</h5>
{:else if type === 'h6'}
<h6 class={className} bind:this={containerElement}>{text}</h6>
{/if}