2021-11-02 09:45:27 +01:00
|
|
|
<script>
|
|
|
|
import { getContext, setContext } from "svelte"
|
|
|
|
|
|
|
|
const component = getContext("component")
|
|
|
|
|
2021-11-02 09:58:50 +01:00
|
|
|
// We need to set a block context to know we're inside a block, but also
|
|
|
|
// to be able to reference the actual component ID of the block from
|
|
|
|
// any depth
|
2021-11-02 13:58:38 +01:00
|
|
|
setContext("block", { id: $component.id })
|
2021-11-02 09:45:27 +01:00
|
|
|
</script>
|
|
|
|
|
2021-11-03 12:58:06 +01:00
|
|
|
<slot />
|