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:
parent
61950cc4f3
commit
3174ed252e
1 changed files with 14 additions and 0 deletions
14
src/components/ui/avatars/Avatar.astro
Normal file
14
src/components/ui/avatars/Avatar.astro
Normal 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}
|
||||||
|
/>
|
Loading…
Add table
Reference in a new issue