2021-06-11 09:05:49 +02:00
|
|
|
<script>
|
|
|
|
import { getContext } from "svelte"
|
|
|
|
|
|
|
|
const { builderStore } = getContext("sdk")
|
|
|
|
const component = getContext("component")
|
|
|
|
|
2021-06-25 16:29:24 +02:00
|
|
|
export let text
|
2021-06-11 09:05:49 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if $builderStore.inBuilder}
|
|
|
|
<div>
|
2021-06-25 16:29:24 +02:00
|
|
|
{text || $component.name || "Placeholder"}
|
2021-06-11 09:05:49 +02:00
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<style>
|
|
|
|
div {
|
2021-07-05 15:02:49 +02:00
|
|
|
color: var(--spectrum-global-color-gray-600);
|
2021-06-11 09:45:58 +02:00
|
|
|
font-size: var(--font-size-s);
|
2021-06-11 09:05:49 +02:00
|
|
|
}
|
|
|
|
</style>
|