2021-06-05 14:33:35 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
|
|
|
import { onMount, createEventDispatcher } from "svelte";
|
|
|
|
|
2021-06-21 18:15:41 +02:00
|
|
|
let forId: string;
|
|
|
|
export { forId as for };
|
|
|
|
|
2021-06-05 14:33:35 +02:00
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
|
|
|
|
let spanRef: HTMLSpanElement;
|
|
|
|
|
|
|
|
onMount(() => {
|
|
|
|
dispatch("mount", { span: spanRef });
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2021-06-21 18:15:41 +02:00
|
|
|
<label bind:this={spanRef} for={forId}><slot /></label>
|