fix(runtime): stabilize navigation and custom errors
This commit is contained in:
@@ -10,14 +10,18 @@ component Card {
|
||||
|
||||
props {
|
||||
title: string = "Card title"
|
||||
titleKey: string = ""
|
||||
subtitle: string = ""
|
||||
subtitleKey: string = ""
|
||||
description: string = ""
|
||||
descriptionKey: string = ""
|
||||
header: string = ""
|
||||
footer: string = ""
|
||||
imageSrc: string = ""
|
||||
imageAlt: string = ""
|
||||
imagePosition: string = "top"
|
||||
actionLabel: string = ""
|
||||
actionLabelKey: string = ""
|
||||
actionHref: string = ""
|
||||
headerActions: unknown[] = []
|
||||
navigation: unknown[] = []
|
||||
@@ -105,13 +109,13 @@ component Card {
|
||||
|
||||
<div class="wrn-next__card-content">
|
||||
{#if item.title || item.label}
|
||||
<h3>{item.title || item.label}</h3>
|
||||
<h3 data-t='{item.titleKey || item.labelKey || ""}'>{item.title || item.label}</h3>
|
||||
{/if}
|
||||
{#if item.subtitle}
|
||||
<p class="wrn-next__card-subtitle">{item.subtitle}</p>
|
||||
<p class="wrn-next__card-subtitle" data-t='{item.subtitleKey || ""}'>{item.subtitle}</p>
|
||||
{/if}
|
||||
{#if item.description}
|
||||
<p class="wrn-next__card-description">{item.description}</p>
|
||||
<p class="wrn-next__card-description" data-t='{item.descriptionKey || ""}'>{item.description}</p>
|
||||
{/if}
|
||||
{#if item.actionLabel || item.href}
|
||||
<a
|
||||
@@ -119,7 +123,7 @@ component Card {
|
||||
class="wrn-next__card-action"
|
||||
@click='output.action({ item: item, index: itemIndex })'
|
||||
>
|
||||
<span>{item.actionLabel || "Learn more"}</span>
|
||||
<span data-t='{item.actionLabelKey || ""}'>{item.actionLabel || "Learn more"}</span>
|
||||
<span class="icon-[lucide--arrow-right]" aria-hidden="true"></span>
|
||||
</a>
|
||||
{/if}
|
||||
@@ -168,10 +172,10 @@ component Card {
|
||||
<p class="wrn-next__card-eyebrow">{header}</p>
|
||||
{/if}
|
||||
{#if title}
|
||||
<h3>{title}</h3>
|
||||
<h3 data-t='{titleKey}'>{title}</h3>
|
||||
{/if}
|
||||
{#if subtitle}
|
||||
<p class="wrn-next__card-subtitle">{subtitle}</p>
|
||||
<p class="wrn-next__card-subtitle" data-t='{subtitleKey}'>{subtitle}</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -268,7 +272,7 @@ component Card {
|
||||
</div>
|
||||
{:else}
|
||||
{#if description}
|
||||
<p class="wrn-next__card-description">{description}</p>
|
||||
<p class="wrn-next__card-description" data-t='{descriptionKey}'>{description}</p>
|
||||
{/if}
|
||||
<slot></slot>
|
||||
{/if}
|
||||
@@ -285,7 +289,7 @@ component Card {
|
||||
class="wrn-next__card-action"
|
||||
@click='output.action({ href: actionHref, label: actionLabel })'
|
||||
>
|
||||
<span>{actionLabel}</span>
|
||||
<span data-t='{actionLabelKey}'>{actionLabel}</span>
|
||||
<span class="icon-[lucide--arrow-right]" aria-hidden="true"></span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user