({
className,
title,
type,
state,
...props
}: ToolHeaderProps)
| 68 | }; |
| 69 | |
| 70 | export const ToolHeader = ({ |
| 71 | className, |
| 72 | title, |
| 73 | type, |
| 74 | state, |
| 75 | ...props |
| 76 | }: ToolHeaderProps) => ( |
| 77 | <CollapsibleTrigger |
| 78 | className={cn( |
| 79 | "flex w-full items-center justify-between gap-4 p-3", |
| 80 | className |
| 81 | )} |
| 82 | {...props} |
| 83 | > |
| 84 | <div className="flex items-center gap-2"> |
| 85 | <WrenchIcon className="size-4 text-muted-foreground" /> |
| 86 | <span className="font-medium text-sm"> |
| 87 | {title ?? type.split("-").slice(1).join("-")} |
| 88 | </span> |
| 89 | {getStatusBadge(state)} |
| 90 | </div> |
| 91 | <ChevronDownIcon className="size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180" /> |
| 92 | </CollapsibleTrigger> |
| 93 | ); |
| 94 | |
| 95 | export type ToolContentProps = ComponentProps<typeof CollapsibleContent>; |
| 96 |
nothing calls this directly
no test coverage detected