mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 01:17:37 +03:00
Separate out AuhtorIcon component from list component
This commit is contained in:
parent
444b15631a
commit
50209b4bf7
15
packages/ui/src/lib/components/AuthorIcon.svelte
Normal file
15
packages/ui/src/lib/components/AuthorIcon.svelte
Normal file
@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
import type { Author } from '$lib/vbranches/types';
|
||||
|
||||
export let author: Author;
|
||||
</script>
|
||||
|
||||
<img
|
||||
class="-ml-1 inline-block h-4 w-4 rounded-full first:ml-0"
|
||||
title="Gravatar for {author.email}"
|
||||
alt="Gravatar for {author.email}"
|
||||
srcset="{author.gravatarUrl} 2x"
|
||||
width="100"
|
||||
height="100"
|
||||
on:error
|
||||
/>
|
@ -1,19 +1,14 @@
|
||||
<script lang="ts">
|
||||
import type { Author } from '$lib/vbranches/types';
|
||||
import AuthorIcon from './AuthorIcon.svelte';
|
||||
|
||||
export let authors: Author[];
|
||||
</script>
|
||||
|
||||
<div>
|
||||
{#each authors as author}
|
||||
<img
|
||||
class="-ml-1 inline-block h-4 w-4 rounded-full first:ml-0"
|
||||
title="Gravatar for {author.email}"
|
||||
alt="Gravatar for {author.email}"
|
||||
srcset="{author.gravatarUrl} 2x"
|
||||
width="100"
|
||||
height="100"
|
||||
on:error
|
||||
/>
|
||||
{#if author.gravatarUrl}
|
||||
<AuthorIcon {author} />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user