MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / SkillCard

Function SkillCard

src/components/SkillCard.tsx:18–103  ·  view source on GitHub ↗
({ skill, onViewDetails }: SkillCardProps)

Source from the content-addressed store, hash-verified

16}
17
18export function SkillCard({ skill, onViewDetails }: SkillCardProps) {
19 const truncatedDesc =
20 skill.description.length > 120
21 ? skill.description.slice(0, 120) + "..."
22 : skill.description;
23
24 const iconBgColor = skill.source === "workspace"
25 ? "rgba(168, 85, 247, 0.15)"
26 : "rgba(59, 130, 246, 0.15)";
27
28 const iconColor = skill.source === "workspace" ? "#A855F7" : "#3B82F6";
29
30 return (
31 <div
32 className="rounded-xl p-3 md:p-5 transition-all hover:shadow-lg group"
33 style={{
34 backgroundColor: "var(--card)",
35 border: "1px solid var(--border)"
36 }}
37 >
38 <div className="flex items-start gap-3 md:gap-4 mb-3 md:mb-4">
39 <div
40 className="p-2 md:p-3 rounded-lg transition-colors"
41 style={{ backgroundColor: iconBgColor }}
42 >
43 {skill.emoji ? (
44 <span className="text-xl md:text-2xl">{skill.emoji}</span>
45 ) : (
46 <Puzzle className="w-5 h-5 md:w-6 md:h-6" style={{ color: iconColor }} />
47 )}
48 </div>
49 <div className="flex-1 min-w-0">
50 <h3
51 className="font-bold text-base md:text-lg truncate"
52 style={{ color: "var(--text-primary)", fontFamily: "var(--font-heading)" }}
53 >
54 {skill.name}
55 </h3>
56 <span
57 className="inline-block text-[10px] md:text-xs px-1.5 md:px-2 py-0.5 rounded mt-1"
58 style={{
59 backgroundColor: skill.source === "workspace"
60 ? "rgba(168, 85, 247, 0.2)"
61 : "rgba(59, 130, 246, 0.2)",
62 color: skill.source === "workspace" ? "#C4B5FD" : "#93C5FD"
63 }}
64 >
65 {skill.source === "workspace" ? "Workspace" : "System"}
66 </span>
67 </div>
68 </div>
69
70 <p
71 className="text-xs md:text-sm mb-3 md:mb-4 line-clamp-2"
72 style={{ color: "var(--text-secondary)" }}
73 >
74 {truncatedDesc}
75 </p>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected