johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
<script lang="ts">
import type * as repo from '#lib/lexicons/dev/knotless/repo.ts';
/** A label on a pull or issue, tinted with its color when it has a hex one, its description its title; a link to `href` if given. */
let { label, href }: { label: repo.Label; href?: string } = $props();
const color = $derived(/^#[0-9a-fA-F]{6}$/.test(label.color ?? '') ? label.color : undefined);
</script>
{#if href}<a class="label" {href} rel="nofollow" style:--label={color} title={label.description}
>{label.name}</a
>{:else}<span class="label" style:--label={color} title={label.description}>{label.name}</span
>{/if}