summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/components/Labelled.svelte
blob: 4b36ad6c7817e40062e1315a4044ff2735ea0aee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
<script lang="ts">
	import { idFromLabel } from '$lib/Utils';

	export let label: string;

	const id = idFromLabel(label);
</script>

<label class="self-center" for={id}>{label}</label>
<slot {id} />