2023-03-29 17:21:20 +02:00
|
|
|
<script lang="ts">
|
|
|
|
/**
|
|
|
|
* Given an HTML string, properly shows this
|
|
|
|
*/
|
|
|
|
|
2023-06-14 20:39:36 +02:00
|
|
|
export let src: string
|
|
|
|
let htmlElem: HTMLElement
|
2023-03-29 17:21:20 +02:00
|
|
|
$: {
|
2023-04-21 18:09:14 +02:00
|
|
|
if (htmlElem) {
|
2023-06-14 20:39:36 +02:00
|
|
|
htmlElem.innerHTML = src
|
2023-03-29 17:21:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-15 05:38:52 +02:00
|
|
|
export let clss: string | undefined = undefined
|
2023-03-29 17:21:20 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if src !== undefined}
|
2023-06-14 20:39:36 +02:00
|
|
|
<span bind:this={htmlElem} class={clss} />
|
2023-03-29 17:21:20 +02:00
|
|
|
{/if}
|