Use custom tooltip in avatar component

This commit is contained in:
Mattias Granlund 2024-05-16 15:20:25 +02:00
parent 2035bcf1ce
commit 61a0f817c0

View File

@ -1,4 +1,5 @@
<script lang="ts"> <script lang="ts">
import { tooltip } from '$lib/utils/tooltip';
import type { Author, CommitStatus } from '$lib/vbranches/types'; import type { Author, CommitStatus } from '$lib/vbranches/types';
export let author: Author; export let author: Author;
@ -7,7 +8,6 @@
<img <img
class="avatar" class="avatar"
title={author.name}
alt="Gravatar for {author.email}" alt="Gravatar for {author.email}"
srcset="{author.gravatarUrl} 2x" srcset="{author.gravatarUrl} 2x"
width="100" width="100"
@ -15,6 +15,7 @@
class:remote={status == 'remote'} class:remote={status == 'remote'}
class:local={status == 'local'} class:local={status == 'local'}
class:upstream={status == 'upstream'} class:upstream={status == 'upstream'}
use:tooltip={author.name}
on:error on:error
/> />