forked from MapComplete/MapComplete
		
	Looking at https://github.com/dcastil/tailwind-merge/blob/v1.13.1/docs/when-and-how-to-use-it.md#how-to-use-it I placed the "winning" class at the end for twMerge
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			337 B
		
	
	
	
		
			Svelte
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			337 B
		
	
	
	
		
			Svelte
		
	
	
	
	
	
| <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}
 |