({
icon,
title,
description,
onClick,
isNew,
}: ExampleCardProps)
| 11 | } |
| 12 | |
| 13 | function ExampleCard({ |
| 14 | icon, |
| 15 | title, |
| 16 | description, |
| 17 | onClick, |
| 18 | isNew, |
| 19 | }: ExampleCardProps) { |
| 20 | return ( |
| 21 | <button |
| 22 | onClick={onClick} |
| 23 | className={`group w-full text-left p-4 rounded-xl border bg-card hover:bg-accent/50 hover:border-primary/30 transition-all duration-200 hover:shadow-sm ${ |
| 24 | isNew |
| 25 | ? "border-primary/40 ring-1 ring-primary/20" |
| 26 | : "border-border/60" |
| 27 | }`} |
| 28 | > |
| 29 | <div className="flex items-start gap-3"> |
| 30 | <div |
| 31 | className={`w-9 h-9 rounded-lg flex items-center justify-center shrink-0 transition-colors ${ |
| 32 | isNew |
| 33 | ? "bg-primary/20 group-hover:bg-primary/25" |
| 34 | : "bg-primary/10 group-hover:bg-primary/15" |
| 35 | }`} |
| 36 | > |
| 37 | {icon} |
| 38 | </div> |
| 39 | <div className="min-w-0"> |
| 40 | <div className="flex items-center gap-2"> |
| 41 | <h3 className="text-sm font-medium text-foreground group-hover:text-primary transition-colors"> |
| 42 | {title} |
| 43 | </h3> |
| 44 | {isNew && ( |
| 45 | <span className="px-1.5 py-0.5 text-[10px] font-semibold bg-primary text-primary-foreground rounded"> |
| 46 | NEW |
| 47 | </span> |
| 48 | )} |
| 49 | </div> |
| 50 | <p className="text-xs text-muted-foreground mt-0.5 line-clamp-2"> |
| 51 | {description} |
| 52 | </p> |
| 53 | </div> |
| 54 | </div> |
| 55 | </button> |
| 56 | ) |
| 57 | } |
| 58 | |
| 59 | export default function ExamplePanel({ |
| 60 | setInput, |
nothing calls this directly
no outgoing calls
no test coverage detected