Refactor avatar components, add space edit form

This commit is contained in:
Jon Staab
2025-11-11 13:39:32 -08:00
parent 183aebf841
commit 8e411daaef
32 changed files with 356 additions and 157 deletions
+4 -3
View File
@@ -5,13 +5,14 @@
src: string
alt: string
size?: number
class?: string
}
const {src, alt, size = 5}: Props = $props()
const {src, alt, size = 5, ...props}: Props = $props()
</script>
{#if src.includes("image/svg") || src.endsWith(".svg")}
<Icon icon={src} {size} />
<Icon icon={src} {size} class={props.class} />
{:else}
<img {src} {alt} class="h-{size} w-{size} rounded-lg object-cover" />
<img {src} {alt} class="h-{size} w-{size} aspect-square object-cover {props.class}" />
{/if}