Skip to content

Commit e7cf22b

Browse files
committed
feat: added avatar component
1 parent b6976e2 commit e7cf22b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/components/ui/Avatar.astro

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
import { Image } from 'astro:assets';
3+
import { DEFAULT_CONFIGURATION } from '@/lib/constants'
4+
5+
interface Props {
6+
class?: string;
7+
}
8+
const { class: className } = Astro.props;
9+
---
10+
11+
<div class:list={[
12+
'relative rounded-full shrink-0 overflow-hidden w-12 h-12',
13+
className,
14+
]}>
15+
<Image
16+
loading="eager"
17+
src={DEFAULT_CONFIGURATION.author.avatar.src}
18+
alt={DEFAULT_CONFIGURATION.author.name}
19+
width={52}
20+
height={52}
21+
class="object-cover"
22+
/>
23+
</div>

0 commit comments

Comments
 (0)