budibase/packages/client/src/components/Block.svelte

15 lines
268 B
Svelte
Raw Normal View History

<script>
import { getContext, setContext } from "svelte"
const component = getContext("component")
const { styleable } = getContext("sdk")
setContext("block", {
id: $component.id,
})
</script>
<div use:styleable={$component.styles}>
<slot />
</div>