Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
Svelte
at icy/tmrrpn
12345678910111213141516171819202122232425262728293031323334353637383940<script lang="ts"> import type { DiffStat } from "$lib/api/diff";
interface Props { stat: DiffStat; class?: string; }
let { stat, class: className = "" }: Props = $props();</script>
{#if stat.insertions > 0 || stat.deletions > 0} <div class="flex items-center typography-monospace-regular font-mono {className}"> {#if stat.insertions > 0 && stat.deletions > 0} <span class="rounded-l bg-background-success-subtle p-1 text-foreground-success select-none" > +{stat.insertions} </span> <span class="rounded-r bg-background-danger-subtle p-1 text-foreground-danger select-none" > -{stat.deletions} </span> {:else if stat.insertions > 0} <span class="rounded-sm bg-background-success-subtle p-1 text-foreground-success select-none" > +{stat.insertions} </span> {:else} <span class="rounded-sm bg-background-danger-subtle p-1 text-foreground-danger select-none" > -{stat.deletions} </span> {/if} </div>{/if}