This commit is contained in:
SPRINX0\prochazka
2025-10-29 14:59:14 +01:00
parent f0ac047978
commit 47eb74d5ba

View File

@@ -1,18 +1,22 @@
<script lang="ts"> <script lang="ts">
import { openWebLink } from '../utility/simpleTools';
export let text: string; export let text: string;
export let colorClass: string = 'premium-gradient'; export let colorClass: string = 'premium-gradient';
export let link: string; export let link: string;
</script> </script>
{#if link} <div
<a class="highlight {colorClass}" href={link}> class="highlight {colorClass}"
{text} class:isLink={!!link}
</a> on:click={() => {
{:else} if (link) {
<div class="highlight {colorClass}"> openWebLink(link);
{text} }
</div> }}
{/if} >
{text}
</div>
<style> <style>
.highlight { .highlight {
@@ -23,6 +27,9 @@
font-weight: bold; font-weight: bold;
border: 1px solid; border: 1px solid;
padding: 5px; padding: 5px;
text-decoration: none; }
.highlight.isLink {
cursor: pointer;
} }
</style> </style>