Skip to content

Commit 16d1efd

Browse files
committed
add kapa button
1 parent 61d43fe commit 16d1efd

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

src/components/search/index.tsx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import {Fragment, useCallback, useEffect, useRef, useState} from 'react';
4+
import {Button} from '@radix-ui/themes';
45
import {captureException} from '@sentry/nextjs';
56
import {
67
Hit,
@@ -20,7 +21,6 @@ import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
2021
import styles from './search.module.scss';
2122

2223
import {Logo} from '../logo';
23-
import {NavLink} from '../navlink';
2424

2525
// Initialize Algolia Insights
2626
algoliaInsights('init', {
@@ -271,28 +271,32 @@ export function Search({path, autoFocus, searchPlatforms = [], showChatBot}: Pro
271271
{showChatBot && (
272272
<Fragment>
273273
<span className="text-[var(--desatPurple10)] hidden md:inline">or</span>
274-
<NavLink
275-
href="https://docsbot.ai/chat/skFEy0qDC01GrRrZ7Crs/EPqsd8nu2XmKzWnd45tL"
276-
target="_blank"
277-
style={{textWrap: 'nowrap'}}
278-
className="hidden md:flex items-center"
274+
<Button
275+
asChild
276+
variant="ghost"
277+
color="gray"
278+
size="3"
279+
radius="medium"
280+
className="font-medium text-[var(--foreground)] py-2 px-3 uppercase cursor-pointer kapa-ai-class"
279281
>
280-
<svg
281-
xmlns="http://www.w3.org/2000/svg"
282-
fill="none"
283-
viewBox="0 0 24 24"
284-
strokeWidth={1.5}
285-
stroke="currentColor"
286-
className="size-5"
287-
>
288-
<path
289-
strokeLinecap="round"
290-
strokeLinejoin="round"
291-
d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"
292-
/>
293-
</svg>
294-
<span>Ask AI</span>
295-
</NavLink>
282+
<div>
283+
<svg
284+
xmlns="http://www.w3.org/2000/svg"
285+
fill="none"
286+
viewBox="0 0 24 24"
287+
strokeWidth={1.5}
288+
stroke="currentColor"
289+
className="size-5"
290+
>
291+
<path
292+
strokeLinecap="round"
293+
strokeLinejoin="round"
294+
d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"
295+
/>
296+
</svg>
297+
<span>Ask AI</span>
298+
</div>
299+
</Button>
296300
</Fragment>
297301
)}
298302
</div>

0 commit comments

Comments
 (0)