Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | import { DeprecatedApiLegacyBadge } from '@/components/legacy-badge'; |
| 2 | import { VersionBadge } from '@/components/version-badge'; |
| 3 | import { getApiDisplayTitle } from '@/lib/api-deprecation'; |
| 4 | |
| 5 | interface ApiPageTitleProps { |
| 6 | title: string; |
| 7 | version: string | null; |
| 8 | deprecated: boolean; |
| 9 | } |
| 10 | |
| 11 | export function ApiPageTitle({ |
| 12 | title, |
| 13 | version, |
| 14 | deprecated, |
| 15 | }: ApiPageTitleProps) { |
| 16 | const displayTitle = getApiDisplayTitle(title, deprecated); |
| 17 | |
| 18 | return ( |
| 19 | <h1 className="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 text-2xl font-semibold"> |
| 20 | <span>{displayTitle}</span> |
| 21 | {(version || deprecated) && ( |
| 22 | <span className="inline-flex shrink-0 items-center gap-2"> |
| 23 | {version && <VersionBadge version={version} />} |
| 24 | {deprecated && <DeprecatedApiLegacyBadge />} |
| 25 | </span> |
| 26 | )} |
| 27 | </h1> |
| 28 | ); |
| 29 | } |