add link to docs in help boxes

This commit is contained in:
vcoppe
2024-08-07 16:54:48 +02:00
parent d7c756e471
commit 8dee6db813
10 changed files with 28 additions and 13 deletions

View File

@@ -1,8 +1,22 @@
<script>
<script lang="ts">
import { CircleHelp } from 'lucide-svelte';
import { _ } from 'svelte-i18n';
export let link: string | undefined = undefined;
</script>
<div class="{$$props.class || ''} text-sm bg-muted rounded border flex flex-row items-center p-2">
<div class="text-sm bg-muted rounded border flex flex-row items-center p-2 {$$props.class || ''}">
<CircleHelp size="16" class="w-4 mr-2 shrink-0 grow-0" />
<slot />
<div>
<slot />
{#if link}
<a
href={link}
target="_blank"
class="text-sm text-blue-500 dark:text-blue-300 hover:underline"
>
{$_('menu.more')}
</a>
{/if}
</div>
</div>