forked from MapComplete/MapComplete
Refactoring: move all code files into a src directory
This commit is contained in:
parent
de99f56ca8
commit
e75d2789d2
389 changed files with 0 additions and 12 deletions
19
src/UI/Base/FromHtml.svelte
Normal file
19
src/UI/Base/FromHtml.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang="ts">
|
||||
/**
|
||||
* Given an HTML string, properly shows this
|
||||
*/
|
||||
|
||||
export let src: string
|
||||
let htmlElem: HTMLElement
|
||||
$: {
|
||||
if (htmlElem) {
|
||||
htmlElem.innerHTML = src
|
||||
}
|
||||
}
|
||||
|
||||
export let clss: string | undefined = undefined
|
||||
</script>
|
||||
|
||||
{#if src !== undefined}
|
||||
<span bind:this={htmlElem} class={clss} />
|
||||
{/if}
|
||||
Loading…
Add table
Add a link
Reference in a new issue