| 1 | export interface SectionHeaderProps { |
| 2 | title: string; |
| 3 | count?: number; |
| 4 | action?: React.ReactNode; |
| 5 | className?: string; |
| 6 | } |
| 7 | |
| 8 | export function SectionHeader({ |
| 9 | title, |
| 10 | count, |
| 11 | action, |
| 12 | className = "", |
| 13 | }: SectionHeaderProps) { |
| 14 | return ( |
| 15 | <div |
| 16 | className={`pb-2 mb-4 ${className}`} |
| 17 | style={{ borderBottom: "1px solid var(--border-subtle)" }} |
| 18 | > |
| 19 | <div className="flex items-center justify-between"> |
| 20 | <div |
| 21 | className="flex items-center gap-2" |
| 22 | style={{ |
| 23 | borderLeft: "3px solid var(--accent)", |
| 24 | paddingLeft: "12px", |
| 25 | }} |
| 26 | > |
| 27 | <h2 |
| 28 | className="text-sm" |
| 29 | style={{ |
| 30 | color: "var(--text-muted)", |
| 31 | textTransform: "uppercase", |
| 32 | letterSpacing: "0.05em", |
| 33 | }} |
| 34 | > |
| 35 | {title} |
| 36 | </h2> |
| 37 | {count !== undefined && ( |
| 38 | <span className="text-xs" style={{ color: "var(--text-faint)" }}> |
| 39 | {count} |
| 40 | </span> |
| 41 | )} |
| 42 | </div> |
| 43 | {action && <div>{action}</div>} |
| 44 | </div> |
| 45 | </div> |
| 46 | ); |
| 47 | } |
| 48 | |