forked from MapComplete/MapComplete
		
	Add DynLink
This commit is contained in:
		
							parent
							
								
									c2819d5e5c
								
							
						
					
					
						commit
						6b37d59e88
					
				
					 1 changed files with 22 additions and 0 deletions
				
			
		
							
								
								
									
										22
									
								
								src/UI/Base/DynLink.svelte
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								src/UI/Base/DynLink.svelte
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,22 @@
 | 
				
			||||||
 | 
					<script lang="ts">
 | 
				
			||||||
 | 
					  import { ImmutableStore, Store } from "../../Logic/UIEventSource"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  export let text: Store<string>
 | 
				
			||||||
 | 
					  export let href: Store<string>
 | 
				
			||||||
 | 
					  export let classnames: Store<string> = undefined
 | 
				
			||||||
 | 
					  export let download: Store<string> = undefined
 | 
				
			||||||
 | 
					  export let ariaLabel: Store<string> = undefined
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  export let newTab: Store<boolean> = new ImmutableStore(false)
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<a
 | 
				
			||||||
 | 
					  href={$href}
 | 
				
			||||||
 | 
					  aria-label={$ariaLabel}
 | 
				
			||||||
 | 
					  title={$ariaLabel}
 | 
				
			||||||
 | 
					  target={$newTab ? "_blank" : undefined}
 | 
				
			||||||
 | 
					  download={$download}
 | 
				
			||||||
 | 
					  class={$classnames}
 | 
				
			||||||
 | 
					>
 | 
				
			||||||
 | 
					  {@html $text}
 | 
				
			||||||
 | 
					</a>
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue