This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / lib / components / repo / RefChip.svelte
667 B 23 lines
1<script lang="ts"> 2 import { resolve } from "$app/paths"; 3 4 interface Props { 5 ownerHandle: string; 6 repoName: string; 7 ref: string; 8 class?: string; 9 } 10 11 let { ownerHandle, repoName, ref, class: className = "" }: Props = $props(); 12 13 const treeHref = $derived( 14 resolve(`/${ownerHandle}/${repoName}/tree/${encodeURIComponent(ref)}` as "/") 15 ); 16</script> 17 18<div 19 class="flex w-fit items-center justify-center gap-2 rounded-sm border border-border-default bg-background-canvas px-2 py-1 whitespace-nowrap {className}" 20> 21 <span class="text-foreground-muted">at</span> 22 <a href={treeHref} class="text-foreground-default no-underline hover:underline">{ref}</a> 23</div>