This commit is contained in:
Karl Ludwig Weise
2025-09-09 21:36:33 +02:00
parent 654d9fe179
commit e2cd43742d
2 changed files with 4 additions and 5 deletions
@@ -1,8 +1,7 @@
<script lang="ts">
import type { MouseEventHandler } from "svelte/elements";
import DoneIcon from "@lucide/svelte/icons/check";
import { Button, type ButtonVariant } from "../button";
import { Headline, Text } from "../typography";
import DoneIcon from "@lucide/svelte/icons/check";
type Step = {
title: string;
@@ -80,13 +80,13 @@
const segments = processTranslation(translation, interpolations);
</script>
{#each segments as segment}
{#each segments as segment, index (`segment-${index}`)}
{#if segment.type === "text"}
{segment.content}
{:else if segment.snippet}
{@render segment.snippet(segment.value, segment.param)}
{:else if defaultSnippet && segment.value}
{@render defaultSnippet(segment.value, segment.param)}
{@render defaultSnippet(segment.value)}
{:else if children && segment.value}
{@render children(segment.value, segment.param)}
{:else}
@@ -94,6 +94,6 @@
{/if}
{/each}
{#snippet defaultSnippet(value: string | number, param: string)}
{#snippet defaultSnippet(value: string | number)}
<em>{value}</em>
{/snippet}