Refactor: Make Avatar in UserItem customisable
This commit is contained in:
parent
b296c0fa02
commit
41b6220160
@ -1,22 +1,21 @@
|
||||
<script>
|
||||
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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user