Files
pocket-id-pocket-id-1/frontend/src/lib/components/ui/avatar/avatar-image.svelte

19 lines
453 B
Svelte
Raw Normal View History

2024-08-12 11:00:25 +02:00
<script lang="ts">
2025-01-19 15:41:16 +01:00
import { Avatar as AvatarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils/style.js';
2024-08-12 11:00:25 +02:00
type $$Props = AvatarPrimitive.ImageProps;
2025-01-19 15:41:16 +01:00
let className: $$Props['class'] = undefined;
export let src: $$Props['src'] = undefined;
export let alt: $$Props['alt'] = undefined;
2024-08-12 11:00:25 +02:00
export { className as class };
</script>
<AvatarPrimitive.Image
{src}
{alt}
2025-01-19 15:41:16 +01:00
class={cn('aspect-square h-full w-full', className)}
2024-08-12 11:00:25 +02:00
{...$$restProps}
/>