({
icon: Icon,
title,
description,
badge,
}: {
icon: React.ElementType;
title: string;
description?: string;
badge?: string;
})
| 7 | * It includes an icon, a title, a description, and badges so users can know easily on if something is recommended or not. |
| 8 | */ |
| 9 | export const SectionHeader = ({ |
| 10 | icon: Icon, |
| 11 | title, |
| 12 | description, |
| 13 | badge, |
| 14 | }: { |
| 15 | icon: React.ElementType; |
| 16 | title: string; |
| 17 | description?: string; |
| 18 | badge?: string; |
| 19 | }) => ( |
| 20 | <div className="flex flex-col gap-2 mb-6"> |
| 21 | <div className="flex items-center gap-3 text-gleam-charcoal dark:text-gray-100"> |
| 22 | {/* Icon Container */} |
| 23 | <div className="p-2.5 bg-white text-indigo-500 rounded-xl shadow-sm ring-1 ring-black/5 dark:bg-slate-800 dark:text-sky-400 dark:ring-white/10"> |
| 24 | <Icon className="w-6 h-6" strokeWidth={2} /> |
| 25 | </div> |
| 26 | |
| 27 | {/* Title & Badge */} |
| 28 | <div className="flex items-center gap-3"> |
| 29 | <h3 className="font-display font-bold text-2xl tracking-tight text-gleam-charcoal dark:text-white"> |
| 30 | {title} |
| 31 | </h3> |
| 32 | {badge && ( |
| 33 | <span className="bg-indigo-100 text-indigo-700 dark:bg-sky-500/20 dark:text-sky-300 text-xs font-bold px-2 py-1 rounded-full uppercase tracking-wider"> |
| 34 | {badge} |
| 35 | </span> |
| 36 | )} |
| 37 | </div> |
| 38 | </div> |
| 39 | |
| 40 | {/* Description Text */} |
| 41 | {description && ( |
| 42 | <p className="text-slate-500 dark:text-slate-400 text-lg font-medium leading-relaxed pl-[3.75rem] max-w-2xl"> |
| 43 | {description} |
| 44 | </p> |
| 45 | )} |
| 46 | </div> |
| 47 | ); |
nothing calls this directly
no outgoing calls
no test coverage detected