Add Avatar component

The commit introduces an Avatar component in Astro. This component is primarily used for displaying user avatars, taking in source and alt text as props. It's highly reusable, providing versatility for displaying avatars across various features in the application.
This commit is contained in:
Emil Gulamov 2024-02-11 22:46:11 +04:00
parent 61950cc4f3
commit 3174ed252e

View file

@ -0,0 +1,14 @@
---
const { src, alt = "Image Description" } = Astro.props;
interface Props {
src?: string;
alt?: string;
}
---
<img
class="inline-block h-8 w-8 rounded-full ring-2 ring-neutral-50 dark:ring-zinc-800"
src={src}
alt={alt}
/>