File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments