budibase/packages/standard-components/src/Placeholder.svelte

22 lines
332 B
Svelte
Raw Normal View History

<script>
import { getContext } from "svelte"
const { builderStore } = getContext("sdk")
const component = getContext("component")
export let text = $component.name || "Placeholder"
</script>
{#if $builderStore.inBuilder}
<div>
{text}
</div>
{/if}
<style>
div {
padding: 20px;
color: #888;
}
</style>