Refactor: Make Avatar in UserItem customisable
This commit is contained in:
parent
b296c0fa02
commit
41b6220160
@ -1,22 +1,21 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import Avatar from "./avatar.svelte";
|
||||||
import Mention from "./mention.svelte";
|
import Mention from "./mention.svelte";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import("$types/base").User | undefined | null}
|
* @type {import("$types/base").User | undefined | null}
|
||||||
*/
|
*/
|
||||||
export let user;
|
export let user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
export let iconSize = 16;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.icon {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
border-radius: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<Mention user={user}>
|
<Mention user={user}>
|
||||||
<svg class="icon" viewBox="0 0 100 100">
|
<Avatar size={iconSize}></Avatar>
|
||||||
<use href="/avatar.svg#avatar"></use>
|
|
||||||
</svg>
|
|
||||||
</Mention>
|
</Mention>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user