2021-06-11 23:15:40 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="typescript">
|
|
|
|
import marked from "marked";
|
|
|
|
import { infoCircle } from "./icons";
|
|
|
|
import WithTooltip from "./WithTooltip.svelte";
|
|
|
|
import Label from "./Label.svelte";
|
|
|
|
import Badge from "./Badge.svelte";
|
|
|
|
|
|
|
|
export let markdownTooltip: string;
|
2021-06-21 18:15:41 +02:00
|
|
|
let forId: string;
|
|
|
|
export { forId as for };
|
2021-06-11 23:15:40 +02:00
|
|
|
</script>
|
|
|
|
|
2021-06-21 18:15:41 +02:00
|
|
|
<span
|
|
|
|
><Label for={forId}><slot /></Label><WithTooltip
|
|
|
|
tooltip={marked(markdownTooltip)}
|
|
|
|
let:createTooltip
|
2021-06-21 19:11:10 +02:00
|
|
|
><Badge
|
|
|
|
class="opacity-50"
|
|
|
|
on:mount={(event) => createTooltip(event.detail.span)}
|
2021-06-21 17:48:18 +02:00
|
|
|
>{@html infoCircle}</Badge
|
|
|
|
></WithTooltip
|
2021-06-21 18:15:41 +02:00
|
|
|
></span
|
2021-06-21 17:48:18 +02:00
|
|
|
>
|