-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script lang="ts"> | ||
export let avatar: string | undefined = undefined | ||
export let name: string | ||
export let description: string | ||
export let link: string = '#' | ||
</script> | ||
|
||
<div class="flex flex-row items-center gap-2 {$$props.class}"> | ||
{#if $$slots.avatar || avatar} | ||
{#if $$slots.avatar} | ||
<slot name="avatar" /> | ||
{:else} | ||
<img | ||
src={avatar} | ||
alt="{name}'s profile" | ||
width={40} | ||
height={40} | ||
class="w-10 h-10 rounded-full" | ||
/> | ||
{/if} | ||
{/if} | ||
<div class="flex flex-col"> | ||
<a | ||
href={link} | ||
class="font-semibold text-lg" | ||
class:hover:underline={link != '#'} | ||
> | ||
{name} | ||
</a> | ||
<span class="text-slate-700 dark:text-zinc-300">{description}</span> | ||
</div> | ||
</div> |