Files
WRNexusJS/packages/i18n/components/LocaleStatus.wrn
T
Clintchiz 4cebacadfe
Quality / quality (ubuntu-latest) (push) Failing after 12m9s
Quality / quality (windows-latest) (push) Canceled after 0s
release: WRNexusJS 0.8.3
2026-08-03 19:47:30 +05:30

24 lines
794 B
Plaintext

import { Badge, Card } from "@wrnexus/ui"
component LocaleStatus {
props {
locale: string = "en"
direction: string = "ltr"
translated: number = 0
total: number = 0
label: string = "Current language"
color: string = "primary"
size: string = "sm"
class: string = ""
}
view {
<Card {...attrs} title='{label}' color='{color}' size='{size}' class='{class}'>
<div class="flex flex-wrap items-center gap-2">
<Badge label='{locale}' color='{color}' variant="soft" size='{size}' />
<Badge label='{direction == "rtl" ? "RTL" : "LTR"}' color="neutral" variant="outline" size='{size}' />
{#if total > 0}<span class="text-sm text-[var(--wire-color-muted)]">{translated}/{total} translations</span>{/if}
</div>
</Card>
}
}