forked from tsai/budibase
4 changed files with 42 additions and 27 deletions
@ -0,0 +1,19 @@ |
|||||
|
<script> |
||||
|
import { MarkdownViewer } from "@budibase/bbui" |
||||
|
import { getContext } from "svelte" |
||||
|
import Placeholder from "./Placeholder.svelte" |
||||
|
|
||||
|
export let value |
||||
|
|
||||
|
const component = getContext("component") |
||||
|
const { builderStore, styleable } = getContext("sdk") |
||||
|
const height = $component.styles?.normal?.height |
||||
|
</script> |
||||
|
|
||||
|
<div use:styleable={$component.styles}> |
||||
|
{#if value} |
||||
|
<MarkdownViewer {value} {height} /> |
||||
|
{:else if $builderStore.inBuilder} |
||||
|
<Placeholder /> |
||||
|
{/if} |
||||
|
</div> |
||||
Loading…
Reference in new issue