1
0
Fork 0
mirror of synced 2024-07-06 23:10:57 +12:00
budibase/packages/standard-components/src/Heading.svelte
Joe 70050332e6 Various minor UI updates including the settings modal
Settings modal update includies, improved spacing, element sizing. Working with this part of the platform felt a little brittle. It might be the fact it's a modal.

The frontend component section had a different layout that the block section in the backend and workflow section - updated to follow suit.

Dataform button updated and improved.

Settings button color updated

Additonal data blocks added which are pretty popular (not essential but took me mew a seconds to add and will save me a decent bit in the future)
2020-07-12 19:19:12 +01:00

31 lines
858 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.props.children &&
_bb.props.children.length &&
_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}