Skip to content

Commit b129272

Browse files
authored
Add SkillTags component for displaying skills
1 parent 73b802a commit b129272

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

src/components/ui/SkillTags.astro

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
interface SkillGroup {
3+
title: string;
4+
description: string;
5+
}
6+
7+
interface Props {
8+
listTitle?: string;
9+
skills: SkillGroup[];
10+
}
11+
12+
const { listTitle, skills } = Astro.props;
13+
---
14+
15+
<section>
16+
{listTitle && (
17+
<h2 class="text-2xl font-bold mb-6 border-b pb-2">{listTitle}</h2>
18+
)}
19+
<div class="flex flex-col gap-4">
20+
{skills.map((group) => (
21+
<div class="flex flex-wrap items-baseline gap-x-3 gap-y-2">
22+
<span class="text-sm font-semibold text-base-content/70 w-44 shrink-0">
23+
{group.title}
24+
</span>
25+
<div class="flex flex-wrap gap-2">
26+
{group.description.split(",").map((skill) => (
27+
<span class="badge badge-outline badge-sm px-3 py-2 text-xs font-medium">
28+
{skill.trim()}
29+
</span>
30+
))}
31+
</div>
32+
</div>
33+
))}
34+
</div>
35+
</section>

0 commit comments

Comments
 (0)