Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
tsx 90 lines 2.51 KB
Raw
1 import Image from 'next/image';
2 import { DOCS_PRODUCTS, type DocsProduct } from '@/lib/home-navigation';
3
4 const PLATFORM_BADGE_GRADIENT =
5 'linear-gradient(135deg, #00e68a, #00b4d8, #0077ff)';
6
7 export function ProductBadge({ product }: { product: DocsProduct }) {
8 const isPlatform = product === 'platform';
9
10 return (
11 <span
12 className={
13 'relative flex items-center rounded-[5px] px-[9px] py-[7px] font-mono text-[14px] font-semibold uppercase leading-none tracking-wide ' +
14 (isPlatform
15 ? 'product-badge-platform'
16 : 'text-[#0007cd] dark:text-[#4d6fff]')
17 }
18 style={
19 isPlatform
20 ? {
21 background: PLATFORM_BADGE_GRADIENT,
22 backgroundClip: 'text',
23 WebkitBackgroundClip: 'text',
24 WebkitTextFillColor: 'transparent',
25 }
26 : undefined
27 }
28 >
29 <span
30 aria-hidden="true"
31 className={
32 'pointer-events-none absolute inset-0 rounded-[5px] ' +
33 (isPlatform
34 ? 'product-badge-platform-border'
35 : 'border border-[#0007cd] dark:border-[#4d6fff]')
36 }
37 style={
38 isPlatform
39 ? {
40 padding: '1px',
41 background: PLATFORM_BADGE_GRADIENT,
42 WebkitMask:
43 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
44 WebkitMaskComposite: 'xor',
45 mask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
46 maskComposite: 'exclude',
47 }
48 : undefined
49 }
50 />
51 {DOCS_PRODUCTS[product].product}
52 </span>
53 );
54 }
55
56 export function ComposioWordmark({ compactOnMobile = false }: { compactOnMobile?: boolean }) {
57 return (
58 <span className={compactOnMobile ? 'max-[420px]:hidden' : undefined}>
59 <Image
60 alt="Composio"
61 className="h-[22px] w-auto dark:hidden"
62 height={20}
63 src="/Composio Logo.svg"
64 width={110}
65 />
66 <Image
67 alt="Composio"
68 className="hidden h-[22px] w-auto dark:block"
69 height={20}
70 src="/Composio Logo Dark.svg"
71 width={110}
72 />
73 </span>
74 );
75 }
76
77 export function ProductLockup({
78 product,
79 compactOnMobile = false,
80 }: {
81 product: DocsProduct;
82 compactOnMobile?: boolean;
83 }) {
84 return (
85 <span className="inline-flex min-w-0 items-center gap-2">
86 <ComposioWordmark compactOnMobile={compactOnMobile} />
87 <ProductBadge product={product} />
88 </span>
89 );
90 }