feat: add profile recoloring
This commit is contained in:
1 parent
343e3cf78a
commit
8182fa09e7
4 files changed
+83
-16
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import type { Profile } from '$lib/auth.js'
|
||||
import { Icon, UserCircle } from 'svelte-hero-icons'
|
||||
|
||||
export let profile: Profile | undefined = undefined
|
||||
export let selected: boolean = false
|
||||
export let index: number = 0
|
||||
export let size: number = 20
|
||||
</script>
|
||||
|
||||
{#if profile}
|
||||
<Icon
|
||||
src={UserCircle}
|
||||
mini={selected}
|
||||
size={`${size}`}
|
||||
title={profile.username}
|
||||
class="text-blue-500"
|
||||
style={profile.color
|
||||
? `color: ${profile.color}`
|
||||
: `filter: hue-rotate(${index * 50}deg)`}
|
||||
/>
|
||||
{/if}
|
||||
Reference in new issue
Block a user