Refactor: Make Avatar in UserItem customisable

This commit is contained in:
Donatas Kirda 2024-05-14 00:29:48 +03:00
parent b296c0fa02
commit 41b6220160
Signed by: bloodwiing
GPG Key ID: 63020D8D3F4A164F

View File

@ -1,22 +1,21 @@
<script>
import Mention from "./mention.svelte";
import Avatar from "./avatar.svelte";
import Mention from "./mention.svelte";
/**
* @type {import("$types/base").User | undefined | null}
*/
export let user;
/**
* @type {number}
*/
export let iconSize = 16;
</script>
<style>
.icon {
width: 16px;
height: 16px;
border-radius: 100%;
}
</style>
<Mention user={user}>
<svg class="icon" viewBox="0 0 100 100">
<use href="/avatar.svg#avatar"></use>
</svg>
<Avatar size={iconSize}></Avatar>
</Mention>