immich/web/src/lib/components/i18n/format-bold-message.svelte

21 lines
522 B
Svelte
Raw Normal View History

<script lang="ts">
2024-12-18 15:19:48 +01:00
import type { InterpolationValues } from '$lib/components/i18n/format-message';
import FormatMessage from '$lib/components/i18n/format-message.svelte';
import type { Translations } from 'svelte-i18n';
interface Props {
key: Translations;
values?: InterpolationValues;
}
let { key, values = {} }: Props = $props();
</script>
<FormatMessage {key} {values}>
{#snippet children({ message, tag })}
{#if tag === 'b'}
<b>{message}</b>
{/if}
{/snippet}
</FormatMessage>