Skip to content

Commit

Permalink
feat: Add subData support to AdditionStat component
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthGigi committed Jul 20, 2024
1 parent 6742851 commit 270461a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lib/components/AdditionStat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
export let text: string;
export let data: string;
export let subData: string | undefined = undefined;
export let asterisk: boolean = false;
let className: string | null | undefined = undefined;
Expand All @@ -13,7 +14,13 @@
<Tooltip.Root group="additional-stats" openDelay={0} closeDelay={0}>
<Tooltip.Trigger class={cn(`my-0 flex items-center gap-1 text-sm font-bold text-text/60 data-[is-tooltip=false]:cursor-default`, className)} data-is-tooltip={asterisk}>
<div class="capitalize">{text}:</div>
<span class="-mr-0.5 text-text">{data}</span>
<span class="-mr-0.5 text-text"
>{data}
{#if subData}
<span class="text-text/80"> {subData}</span>
{/if}
</span>

{#if asterisk}
*
{/if}
Expand Down

0 comments on commit 270461a

Please sign in to comment.